Can you ever get the upload to work? If you run it on the emulator? If you run it on a device but use WiFi instead of the cell network?
Are there any differing scenarios where that same code will work or not work? Have you tried downloading the file from S3, renaming it to JPG and seeing if it is valid/corrupted/nonsense? Are the uploaded files (no matter which image you use) always 32 bytes? That might imply an error message is getting streamed to S3 and not the image data itself in which case reading it might help you figure out what is going on (e.g. permission issue). On Feb 23, 11:48 pm, ishwarya <[email protected]> wrote: > Hi there, > > I am trying to upload image file from my android app to > amazon s3.The problem is that the files are not getting properly > uploaded to S3. > > I am using PutObjectRequest as follows to upload file to S3 > > PutObjectRequest p=new PutObjectRequest(String > > Bucketname,Stirng key,InputStream in,ObjectMetadata metadata); > > Upload myUpload = tx.upload(p); > > //In ObjectMetadata argument I am passing only the content length > > When viewed through AWS management console to check the properties of > the uploaded file, I could see > only 32 Bytes of 5.2 KB image file getting uploaded. > > Also, under the Metadata tab of the file in the AWS console, I am able > to see the value of the file as "application/octet-stream" instead of > "image/jpeg" > > I tried doing Multipart upload but it seems to be complex. > > Could somebody help me with this??????? > > Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

