Blasanka / aws_s3_plugin

This is a plugin created for file upload to AWS S3
Other
10 stars 13 forks source link

Uploading image to s3 using this plugin works fine in emulator but doesnot work in physical device #15

Open randhawagagan opened 3 years ago

arammarm commented 3 years ago

I'm facing this issue too. Please help me out. When I try emulator this plugin is work with not issue but when install physical device it not working. Here is the error returned on exception. Attempt to invoke virtual method 'c.a.y.b.a.i c.a.y.b.a.q.a(java.lang.String, java.lang.String, java.io.File, c.a.b0.c.g.e)' on a null object reference

Here is the code

 AwsS3 awsS3 = AwsS3(
        awsFolderPath: path,
        file: _uploadFile,
        fileNameWithExt: getFileNameFromPath(_uploadFile.path),
        poolId: LetterManager().awsS3IPoolID,
        region: LetterManager().awsS3Region,
        bucketName: LetterManager().awsS3BucketName);
    setState(() {
      isFileUploading = true;
    });
    this.displayUploadDialog(awsS3);
    try {
      result = await awsS3.uploadFile;
      debugPrint("Result :'$result'.");
      showSuccessToast('Video uploaded successfully!');
      setState(() {
        uploadedToS3Success = true;
      });
    } on PlatformException catch (e) {
      debugPrint("Failed :'${e.message}'.");
      var _body = {
        "subject": "Storypal App Exception (#E301)",
        "body":
            "ErrorType: Duriting Vidoe Upload \n <br> "
            "Error Reponse: ${e.message}"
      };
      AuthenticationManager().sendErrorEmail(_body);
      showErrorToast('Video upload failed!, Please try again.');
      setState(() {
        uploadedToS3Success = false;
      });
    }
raahul976 commented 2 years ago

Did you guys find any solution. My images are uploading from debug in android studio but in apk it doesn't work

eriklive commented 2 years ago

So, anything new on that? Did you guys changed to another package?