Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: How to save files to folder inside of bucket? #26278
    localtechguy
    Post count: 4

    figured it out. S3 doesnt use folders. the folders you see are actually just filenames.

    in any case, if you want to save files into a folder inside of a bucket, then simply add the folder before the filename.

    line 210 on index.php
    change :
    return makeid() + ‘-‘ + filename;

    to :
    return ‘FOLDER_NAME/’makeid() + ‘-‘ + filename;

    I also got rid of the makeid() function so my original filenames dont get changed.
    not sure why this was implemented in the first place, i assume so every file upload is unique?

    here is my code without the random characters before each filename
    return ‘FOLDER_NAME/’+ filename;

Viewing 1 post (of 1 total)