Open codal-mpawar opened 5 years ago
use a suitable converter for base64 instead then pass the uri
did you find solution for this ?
@prakhar-mindcrew use this library : import { RNS3 } from "react-native-upload-aws-s3-master"; options = { keyPrefix: "media/story/" + (imagesToUpload[file].type == "video/mp4" ? "video/" : "image/"), bucket: "your bucket", region: "your region", accessKey: "your access key", secretKey: "your secret key", successActionStatus: 201, maxRetries:4 }; let response = await RNS3.put(imagesToUpload[file], options);
const img_uri =
data:image/png;base64, ${value}
; const file = { uri: img_uri, name: "image.png", type: "image/png" }; const options = { keyPrefix: "media/public/profile/", bucket: "asdasdasdsad", region: "asdsadsad", accessKey: "asdasdsadsadsadsadadadad", secretKey: "dasdsadsadsadadasdasdasdsadasd", successActionStatus: 201 }; RNS3.put(file, options)