Search code examples
javascriptamazon-s3uploadfine-uploader

Fine Uploader to S3 Folder


Does anyone know if it's possible to upload to a folder inside an S3 bucket using Fine Uploader? I have tried adding a '\foldername' to the request endpoint but had no luck with that.

Thanks.


Solution

  • S3 doesn't have folders. Some UIs (such as the one in the AWS console) and higher-level APIs may provide this concept, as an abstraction, but S3 doesn't have any native understanding of folders, only keys. You can create any key you want and pass it along to Fine Uploader S3, it will store that file given that specific key. For example, "folder1/subfolder/foobar.txt" is a perfectly valid key name. By default, Fine Uploader generates a UUID and uses that as your object's key name, but you can easily change this by providing an objectProperties.key value, which can also be a function. See the S3 objectProperties option in the documentation for more details.