Home › Forums › ACF PRO › Own custom field type to upload files › Reply To: Own custom field type to upload files
Hello @acf-support,
This function is still alive and works fine.
You wrote:
“Maybe you can copy the files to the new location, get the URL to the new location and then delete the attachment by using the wp_delete_attachment() function?”
“Maybe you can copy the files to the new location”
-> this works fine.
“get the URL to the new location”
-> I have the url.
“and then delete the attachment by using the wp_delete_attachment() function”
-> I wanted to do so when nothing works. I create so but a lot IDs in wp_posts. I was looking for a better solution.
I wanted to do this with a filter for “save_post”. I delete first the attachment from the media library and then i overwrite the attachment_id with the url of to the new location. Right?
excuse my bad English.
Greetings
Skrabbel
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.