amazon-archives / aws-sdk-react-native

AWS SDK for React Native (developer preview)
Apache License 2.0
631 stars 68 forks source link

completionHandlerEvent / progress doesn't get called #23

Open damathryx opened 7 years ago

damathryx commented 7 years ago

I tried the example in TransferUtility and uploading returns success. but the progressEvent and completionHandlerEvent is not getting called.

What am I missing?

fabriciovergara commented 7 years ago

It is not in the documentation, but for android you have to declare a service in the Manifest: http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/getting-started-store-retrieve-s3-transferutility.html

on iOS I'm still working on, but with no success as you can see here: https://github.com/awslabs/aws-sdk-react-native/issues/22

damathryx commented 7 years ago

@fabriciovergal thanks, I added the service but still the same.

I added some console

image

fabriciovergara commented 7 years ago

Are you sending the image URI. You should send absolute path (like: /storage/0/DCIM100/Camera/Image.jpg) on Android and URI on iOS

damathryx commented 7 years ago

@fabriciovergal yes I am like in the example. image

fabriciovergara commented 7 years ago

Check the SQLite DB file inside the app folder, it's used as upload queue used in the library tunnel service. Probably there is something blocking the upload, such proxy, permissions, etc.

damathryx commented 7 years ago

@fabriciovergal sorry I am not sure where to find it.

you mean its not uploading at all even with the 'success' return from var val = await AWSS3TransferUtility.upload({"requestid":value});

image

fabriciovergara commented 7 years ago

The "success" is returned when the download/upload is successfully added in the queue.

the database can be found in the data/data//databases

damathryx commented 7 years ago

@fabriciovergal i cant find the data folder. where is this located exactly?

fabriciovergara commented 7 years ago

adb shell cd /data/data/yourAppPackage/

amanthegreatone commented 7 years ago

was having the same issue but after adding the service in the android manifest as suggested by @fabriciovergal it works on android.