react-native-aws3 icon indicating copy to clipboard operation
react-native-aws3 copied to clipboard

Not able to create Dynamic sub keyPrefix

Open iiitmahesh opened this issue 7 years ago • 1 comments

Not able to create Dynamic sub keyPrefix while uploading Images???

iiitmahesh avatar Jul 22 '17 08:07 iiitmahesh

Hi My requirement is to make my unique deviceId as Prefix and upload pictures in a folder which is prefix

For example my deviceId is '3ac.....'. so I need to create a folder name as '3ac....' and add pictures in them.

I acheived it by storing deviceId in some variable . this.state.deviceId= '3ac....' and pass this variable in RN3 ie... const options = { keyPrefix: this.state.deviceId+ ('/'), bucket : "your bucket name", region :"your region", accessKey:"your Access Key", secretKey :"your secret Key", successActionStatus :201, contentType:"image/png", }
This will find out one solution for changing the folder name or prefix (here unique deviceID) dynamically..

Hope this will helps you

NeerajaaG avatar Oct 21 '19 07:10 NeerajaaG