Search code examples
androidamazon-web-servicesamazon-s3upload

Upload an image from Android photo to Amazon S3 cloud


I am creating an Android app that suppose to upload an image into the server. I am using Eclipse(HTML5 and Phonegap) and for the upload I use WCF service in visual studio. It works fine, now I need to use same process to upload a photo to Amazon S3. when I add 2 lines of credential to the Web.config of my wcf project I get an error and photos not uploaded. I add these 2 lines:

<appSettings>
    <add key="AWSAccessKey" value=""/>
    <add key="AWSSecretKey" value=""/>
</appSettings>

and I get this error in my android emulator:

Upload failed: code = 3


Solution

  • Try checking the answers of similar questions:

    1) Phonegap's FileTransfer.upload() throwing error code 3 on Android

    2) Phonegap : FileTransfer.upload() fails on Android

    Hope that helps.