Request: add another action hook during upload
-
I’d like to do some modification to the newly added image file (like rescaling and / or quality change) when it got uploaded to replace an existing image. The
enable-media-replace-upload-done
hook is too late for that purpose. What I need is an action to hook into before the attachment meta data gets set (to incorporate the new image dimensions).Suggested code for lines 106 and 126 in upload.php (right after the
chmod
):// allow others to modifiy image size or quality do_action("enable-media-replace-before-update-meta", $current_file);
Thanks,
ChrisPS: I think line 125 should read
@chmod($new_file, $original_file_perms);
instead of@chmod($current_file, $original_file_perms);
Same goes for the seconddo_action
I suggested above.
- The topic ‘Request: add another action hook during upload’ is closed to new replies.