plugins - Uploading images to custom table

admin2025-06-02  2

I'm building my own WordPress plugin and I have a form where I put in some data. In addition, every entry has an image. Does anybody know how I can upload an image using the WordPress media selector?

I'm building my own WordPress plugin and I have a form where I put in some data. In addition, every entry has an image. Does anybody know how I can upload an image using the WordPress media selector?

Share Improve this question asked Mar 12, 2019 at 17:23 EllyElly 32 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

https://codex.wordpress/Function_Reference/media_handle_upload

Maybe this can help you out. This function handles the upload of the file and adds the attachment as WordPress media record. Don't forget to include dependencies if you're uploading from frontend.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748813823a313940.html

最新回复(0)