Home Forums General Issues ACF file upload copy possible?


ACF file upload copy possible?

  • I’m trying to code a image downloads section for a website where small preview pics are supposed to be publicly visible and full size downloads are behind a simple .htaccess password restriction.

    I used the ACF file upload field and changed its upload directory with this little snippet. The files are correctly uploaded to a directory which I protected with a password. Now I want to publicly display a small automatically created preview picture, but that obviously needs to go in a different, unprotected directory.

    So my question is – or at least how I would try to solve this issue:
    Can I get WordPress to generate another image size in a different directory (can be default uploads directory) -OR- copy one of the automatically created smaller sizes into a different directory – and somehow add the path to that file as post meta?

    It would be a bonus if the new preview pic somehow gets registered with the WP attachment, so it also gets deleted when I delete the original via WP media, but I guess that’s not absolutely necessary.

    Maybe there’s another method for this effect entirely that I’m not thinking of right now, so any and all tips are appreciated! Thank you.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.