Support

Account

Home Forums General Issues Upload file field saves to odd folder

Solved

Upload file field saves to odd folder

  • I’m having a strange issue using the field upload file.
    Everything goes fine when uploading a new file, but when I upload a file which is already in the library (because the content has changed and so, the file needs to be updated), ACF always saves it the folder it was first uploaded to.
    Let me put down some example: a file called “report-new.pdf” is currently saving to /uploads/2022/01 folder as expected, but the file “report.pdf” that was first uploaded on May 2021 is always been saved to /uploads/2021/05 folder instead of the present month when updating the custom post.
    This does not happen when uploading using the WP Media tool.
    I think it may be related to the custom post date field, but I find it strange…

  • When uploading a file in media the file is always uploaded as for the current date (m/y). When uploading a file while editing and existing post WP matches the date (y/m) to the date that the post was first created.

  • Thanks for the answer, I find it more logical the first approach.
    Just to clarify, I’ve tested the second approach and WP matches the published date of the post, not the date it was first created. So if I update de post date to today, the file will be saved to this month’s folder eventhough the post was first created some months ago.

  • Well, yes, the post date is what I meant. Most people do not change that because they want archives to show in reverse date order.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.