We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
getting an exception when trying to upload in ios. The same code works perfectly on android device.
const subscribeWithUpdateState = (id, typeKey, attachment) => { console.log("subscribeWithUpdateState", "id", id, "typeKey", typeKey); transferUtility.subscribe(id, (err, task) => { if(err){ task.errMessage = err; } else{ if(task.state === "completed"){ console.log("task uploaded", task, "attachment", attachment); //update the offline attachment for successful upload updateAttachmentUploaded(attachment); //dispatch action to update the attachment in the store }//end if upload task completed } }); };//end of subscribeWithUpdateState export function uploadAttachment(attachment) { //initialize s3 transferUtility transferUtility.setupWithCognito(S3Options) .then( (result) => { console.log("s3 setup result", result); //compress the file let imagePath = `${dirPicutures}/${attachment.s3_key}`; let compressedImagePath = `${dirPicuturesCompressed}/${attachment.s3_key}`; compressImage(imagePath, compressedImagePath) .then( (imageResized) => { console.log("imageResized boolean", imageResized); //upload to s3 const contentType = "image/jpg"; transferUtility.upload({ bucket: BucketName, key: attachment.s3_key, file: compressedImagePath, meta: { "Content-Type": contentType } }).then( (task) => { console.log("task uploding:", task); //subscribe to the s3 upload status and pass in the attachment to update once upload successful subscribeWithUpdateState(task.id, "uploadTasks", attachment); })//end promise upload to s3 .catch( (error) => console.log("upload error:", error) ); })//end promise successful for compressImage .catch( (error) => console.log("imageResized error", error) ); })//end promise successful s3 cognito setup .catch( (error) => console.log("s3 setup error", error) ); }//end of uploadAttachment
iPhone 6 simulator / iphone 4 device RN 0.40.0 react-native-s3 0.0.24
The text was updated successfully, but these errors were encountered:
It's valid bucket name syook-saas-dev/cache? The bucket name should be DNS-compliant.
syook-saas-dev/cache
Sorry, something went wrong.
yes the bucket is valid. The same code is working on android device perfectly.
can someone help me troubleshoot this?
No branches or pull requests
Hi,
getting an exception when trying to upload in ios. The same code works perfectly on android device.
iPhone 6 simulator / iphone 4 device
RN 0.40.0
react-native-s3 0.0.24
The text was updated successfully, but these errors were encountered: