I could but i really don’t want to post the work of others here, even if it’s open source code.
Rilwis Meta Box Class has a plupload field, which has a custom upload handler.
If you mind to take a look: https://github.com/rilwis/meta-box
resp: https://github.com/rilwis/meta-box/blob/master/inc/fields/plupload-image.php#L31
The answer is there. This code,or at least the idea, gives you much more control over the response.
Related Posts:
- Uploading Multiple Attachments From Front-End With A Description
- media_sideload_image file name?
- How to add media from front-end to an existing post?
- Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
- Creating a multi-file upload form on the front end for attachments
- exposing attachment uploading to the front end — delicate
- How to upload image from front end and save in media library?
- How to delete orphan attachments?
- rename attachments based on parent-post-title on upload
- How to retrieve alt attribute for an attachment (uploaded image)?
- Email Attachment from Form Submit
- Upload multiple image with media_handle_upload with multiple file field [duplicate]
- Undoing define( ‘UPLOADS’, ”.’files’ ); to repoint to “wp-content/uploads” folder
- wp_delete_attachment doesn’t delete image files / doesn’t work
- File was uploaded, but it is not shown on media section of the dashboard
- Using $_FILES variable into the same function for uploading images and files
- How to manage attachment relationships for specific posts in WP 3.5+
- Change attachment filename
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- Getting a taxonomy’s thumbnail url
- Check if post has attachments (not image)
- How to get attachment caption (get_the_excerpt gives parent post excerpt) ?
- How to get all files inserted (but not attached) to a post
- custom fields for attachments?
- Get attachment ID of author_meta image – Attachment Metadata
- URL rewrite with add_rewrite_rule and attachment_id
- Get attachment from post
- Add column for attachment file size
- Change image link: wp_get_attachment_link
- Multi-line captions on attachments
- Automatically wrap post image in div
- Gel all image from certain post type
- ID of images from gallery
- post_id missing from the wp-admin file upload request
- wp_get_attachment_image_src always returns false
- Exact image sizes
- Adding attachment file name to email link
- How to allow specific extensions and file size to wp_mail attachment?
- Add a YouTube or Vimeo video as a post attachment?
- the_content() behavior on attachment.php versus single.php
- Get attachments by user
- attachments with tags and get_posts
- Hide “Gallery Settings” and “Insert into Post” button from Attachment window
- How can I change wordpress attachment url and protect it?
- Adding class to next/prev image link in attachment.php
- Post Auto Draft Issue
- How to make a customized “Create Gallery” tab in the ‘Add Media’ window?
- Ordering of gallery images without using shortcode in theme
- Adding width and height to wp_get_attachment_image_src
- media_sideload_image with rewritten urls?
- How to manage a big collection of files with wordpress?
- Get the bare URL for an attachment
- How can I store a file in the database in the same way WordPress and ACF do?
- How to set post_id to 0 when you upload image via Add media button. (async-upload.php)
- Don’t show attachments if they are inserted in post
- How to protect post attachments related to a custom post type, from non-logged in users, on 1 subsite of a multisite installation?
- How do i save and retrieve custom attachment meta?
- How to change File URL in file uploaded to s3 compatible storage with self written plugin [closed]
- Media library quick/inline edit
- Check what attached image size is used
- Rename attachment filenames to attachment ID on upload
- How to edit attachment with media-upload.php?
- How do you create an attachment ID with Ajax submit? No page refresh
- Get images attached to a specific page
- How to get $attachment->ID in custom functions
- How do I increase the upload size only when editing special pages?
- All attachment pages give 404
- How to make Plupload zones that will survive changes in core?
- Get Attachment Image Class by attachment id
- Automatically deactivate link for attachments
- How to add filetype to meta value when using wp_upload_bits?
- Hiding or removing file extension displayed in HTML on attachment page
- After changing permalink structure, How to redirect attachment url to old parent post url
- How to delete file uploaded by Plupload
- Getting attachment post using wp_get_attachment_link
- wp_mail Allow Remote Attachments from CDN
- Make inline uploader (plupload) on options page upload to a specific folder
- How to identify and delete all the images/pdf’s which are not assigned to any post/custom-post/page and also which are repeated
- Filter not applied to all image sizes
- Zip a file and add as attachment
- What is wrong with my wp_insert_attachment code?
- Remove post with attachments hook
- Setting an image as post header (not featured image)
- PHPMailer – Uploading a file
- Set attachment category from file name on upload
- How to restrict users to only access their own media files in wordpress
- wp_mail doen’t send mails whit attachment
- _d_improd_ directory in uploads breaking site images
- Check if author or uploader id of the attachment(uploaded) image is match?
- When inserting attachments into a blog post, how can I get WordPress to use the full filename with the extension?
- List attachments of a page
- Is there a way to add Reattach and Unattach links in image gallery?
- Upload file to front-end form and send as email attachment
- Post images not displaying as attachments
- Showing the attachment for a page?
- How do I update attachment urls after changing site domain
- Custom Fields, Media uploader, Attachments
- I want to customize wp.media (the wordpress admin uploader) in order to change the file name but only in video custom post type
- One audio attachment, with two possible interchangeable extensions
- Attachement Meta DATA