The ACF documentation says, the native upload of WordPress is triggered, so you can use wp_handle_upload
:
function my_cool_func() {
// whatever it is that you want to do, do it here
} // function my_cool_func
add_action('wp_handle_upload', 'my_cool_func');
Or maybe you want/have to hook into add_attachment
…
Related Posts:
- Question regarding the file path for media_sideload_image and wp_upload_dir()
- Trigger refresh for new media manager in 3.5
- Physical organization of wordpress media library (Real Media Library plugin)
- Extend Media Library
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- How to show all available images in WP’s media library when using the Polylang plugin?
- Give users a maximum upload capacity; limit the number of files a user can upload OR limit the number of files per upload
- Media upload finished hook
- Media not actually deleted on disk when click “Permanent Delete”
- WP 3.5 media manager – how to create a working gallery frame
- How to call WP3.5 Media Library manager?
- Disable media library tab for non admins in uploader screen
- Password protect some uploaded files, so only logged-in users can view them
- How to protect uploads in multisite if user is not logged in?
- Append button to WordPress Image Details modal
- Change URLs for static content
- uploading files to the uploads folder via ftp
- add_image_size creating lots of images (of various sizes)
- How to get the image url in the input box from media library?
- Remove upload_files capability from a role but allow role to manage an avatar image
- Create custom tab in WordPress 5 media upload
- How to Check Disk Space used by Media Library
- How to change the image size in new Media Uploader (ie use medium vs thumbnail)
- How to disable WordPress Media resize different size version?
- Image uploading stuck on “crunching”
- Add media attachment filter to custom wp.media frame
- Change the size of the image preview on the media edit page
- Add select field to media uploader that adds a class to the image
- How to host different file formats/types for a media attachment without creating multiple attachments?
- how to use media library [closed]
- wp_enqueue_media() Will not load JS on the theme
- Replacing Images in Media Library
- How to upload unknown file type?
- Restrict WordPress Media Library for a specific user role (users can only see/select own media)
- Display attachments by the ID of the post being edited in the wp.media frame (frontend)
- Update image via WP REST API
- Media Library does not show the uploaded image
- Attach Thumbnail Generated from Video Upload as Featured Image for the Video
- move_uploaded_file() not working on wordpress front end
- Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically
- How to get the return value of wp.media({ frame: ‘post’ }) in all cases?
- Uploading .mp3 files http error – 2 “exact” files one successful other fails
- WordPress Uploads Directory not using dates in links
- WordPress Media Library showing wrong preview size?
- Original image not saving?
- Restrict role to view own media
- Multi Upload In Theme Options
- How to load attachment in media library for current user?
- How To Watermark Audio
- Resize existing library images
- upload_max_filesize is set to 64 MB already but WordPress is still showing 2 MB
- Storing WordPress Media Library Uploaded files onto a separate domain
- Media Library Won’t Display Any Images
- Issue with images which have no sizes available
- More Fields & Media Upload
- Migrating media files (documents only) to a fresh install and maintaining the same directory structure
- How does wordpress handle media files?
- WordPress media upload issue could not insert attachment into the database
- Thumbnail images missing in WP media library
- get_attached_file returns wrong path after changing media upload dir
- Changing titles in Uploader for “Posts”
- Remove Media File Items From Server That Do Not Exist in Media Library
- What if I have a large file on the server that I want the wp library to have?
- How to remove a tab in Media Upload page in wordpress
- Using WP-CLI “wp media import” to sync files to the media library
- Hide media library images from other roles uploaded by admin
- Efficient way to move media folder to another folder
- Make inline uploader (plupload) on options page upload to a specific folder
- How Do I Change the File Permission For Uploaded Files in WordPress?
- image not display in media library and thumbnail not display in post
- Front-End Upload media with category
- How to manually set an attachment in a post?
- Media Library: Remove replace images of selected author
- What is wrong with my wp_insert_attachment code?
- Adding attachment custom field metadata to TinyMCE tag
- Editor User Role can’t see other users media
- How to upload multiple images using WP rest API to media?
- Using Gravity Forms to upload media into library, then attach to post
- Media import failed in the WordPress importer
- Import all media referenced in posts
- Organizing the Media Library for Cleanup
- Allow author to upload image via Media button without plugin
- Insert media while posting is not working with new wordpress update
- How to configure WordPress to create thumbnails
- My deleted media exists jet
- Exclude some photos in media library
- Failed to load resource at admin screen
- Media uploader & manager: add/remove class on image with checkbox
- wordpress 3.6 media manager cropping timestamp
- Problem uploading files, after changing domain name
- Image uploaded in media library, can only see it when I using the WP Edit Image feature. 404 when trying to view in browser
- Automatically adding images to a certain page through the Media Uploader
- Host Images from Link
- Add frontend editor with media buttons for Visitors and display only their media
- Retroactively change Permalinks for media files after disabling year/month format
- How can comments be turned off for media attachments on WordPress?
- Load images from CDN and custom features to “Add Media” dialogue
- Assign multiple categories to Media Library upload
- Image in binary in the data to WordPress media library
- How can I add custom sizes for PDF thumbnails generation?