TTLabs / EvaporateJS

Javascript library for browser to S3 multipart resumable uploads
1.82k stars 206 forks source link

uploading content to a specific folder inside the s3 bucket #459

Closed shivgarg5676 closed 4 years ago

shivgarg5676 commented 4 years ago

I can successfully upload my contents to the s3 bucket but I need to upload the contents to a specific folder inside the bucket which may or might not exist on the bucket.

Is it possible with evaporate to upload the files to a specific folder inside the s3 bucket?

jakubzitny commented 4 years ago

Yes it is, just put a path to the folder inside the s3 bucket to [name](https://github.com/TTLabs/EvaporateJS/wiki/Evaporate.prototype.add()) parameter of .add().

I'll change it in wiki so it's clear.

shivgarg5676 commented 4 years ago

but this option will only work if the CloudFront option is false otherwise it will not work, because in that case bucket path is present as a subdomain.

jakubzitny commented 4 years ago

You can specify aws_url in add() for that, can you try if that helps? We are using cloudfront=true and upload to subfolders.

shivgarg5676 commented 4 years ago

sure will try that.