Opened 20 years ago
Closed 18 years ago
#899 closed enhancement (fixed)
Wishlist item: hooks for file uploads
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.1 | Priority: | high |
Severity: | normal | Version: | 1.6 |
Component: | Administration | Keywords: | needs-patch |
Focuses: | Cc: |
Description
This hook would be called with the uploaded file, a flag that tells about wether a thumbnail was created and the caption that was given for the upload. The ratio: plugins could hook into this one to get notified when images are uploaded and could feed that data into their databases. Otherwise they can only scan the wp-content directory but the caption is lost if the user isn't using cut-and-paste to transfer it. Would be quite handy for a plugin I am currently working on.
XMLRPC uploads via metaWeblogAPI can call the same hook but just provide an empty string for the caption (as there is no caption provided by the API call).
Change History (10)
#2
@
20 years ago
- Owner changed from anonymous to skippy
- Priority changed from normal to low
- Status changed from new to assigned
- Version changed from 1.5 to 1.6
#4
@
20 years ago
- Priority changed from low to high
Someone (Owen?) is working on redoing the upload functionality. It really needs a total workover. The image uploading functionality is poor... and it's something that people really expect to work well.
#7
@
19 years ago
Per a recent discussion with Matt, the wp_posts.post_status value 'object' is for recording (but not storing) uploads as post children. It is used in the new image-uploading.php and there are now object handlers in functions-post.php. A file_upload action hook should be added to any uploading functions. It should only need one parameter: post_ID.
That is, unless you plan on uploading files that aren't attached to posts.
A hook on file upload would be nice. No such hook or filter exists, currently.