Using WP drag/drop upload, the request payload (via Chrome DevTools) as below :

Content-Disposition: form-data; name="name"

Content-Disposition: form-data; name="action"

Content-Disposition: form-data; name="_wpnonce"

Content-Disposition: form-data; name="async-upload"; filename="butterfly.jpg"
Content-Type: image/jpeg


Is it possible to add more field to this? without using plugins?

1 Answer 1


not without creating your own custom form. There are 2 ways to achieve this,

  1. uploading attachments in the post editor, In your post edit page you can create a custom metabox which will allow you to enter custom fields for your posts. When you save your post, you can hook into the backend saving process using the save_post action and look for your custom fields in the $_POST array of submitted fields. You can also capture the attachment id in case you want to attach your custom fields to the attachment itself.
  2. Creating a custom admin page with am uploader, alternatively you can create a custom admin page and setup your own attachment uploader and custom fields. See this little video tutorial for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.