I am using AWS amplify to upload video in s3 bucket when i am giving key in amplify options its creating a public folder and then taking that key.
Amplify.Storage.uploadFile(
"user/hello/123321.mp4",
exampleFile,
result -> Log.i("MyAmplifyApp", "Successfully uploaded: " + result.getKey()),
storageFailure -> Log.e("MyAmplifyApp", "Upload failed", storageFailure)
);
s3 bucket its going inside - public/user/hello/123321.mp4
I just want my files to go in key and not create any public folder.
is there any option to do that ?
Try:
Storage.put(
"file name",
file (actual file from input) ,
{
level: "public",
customPrefix: {public: "folder name in S3 /"},
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With