aws_s3_upload icon indicating copy to clipboard operation
aws_s3_upload copied to clipboard

returns null without any exception

Open aligurelli opened this issue 2 years ago • 17 comments

trying to upload a photo but response returns null without any exception. couldn't figure out why.

 Future<String?> addPhotoToAws(File path) async {
    String bucketName = "*****";

    final response = await AwsS3.uploadFile(
      accessKey: "*****",
      secretKey: "******",
      file: path,
      bucket: bucketName,
      region: "eu-central-1",
    );

    return response;
  }

any idea?

aligurelli avatar Jan 24 '23 14:01 aligurelli

@Serdnad i am getting 400 Bad request error when I debug the library. can you help?

aligurelli avatar Jan 29 '23 14:01 aligurelli

did you find any solution for this? I'm having the same problem.

Bill550 avatar Jan 31 '23 13:01 Bill550

Same problem any solutions ?

koukibadr avatar Feb 01 '23 17:02 koukibadr

Same problem any solutions ?

koukibadr avatar Feb 22 '23 11:02 koukibadr

did you find any solution for this? I'm having the same problem.

unfortunately:( just decided to handle s3 logic in backend. this is how we solved the problem

aligurelli avatar Feb 24 '23 23:02 aligurelli

@aligurelli try upgrade to the latest package version 1.5.0, I had a similar issue but it's resolved when I did upgrade the version to the latest

koukibadr avatar Feb 26 '23 20:02 koukibadr

@aligurelli try upgrade to the latest package version 1.5.0, I had a similar issue but it's resolved when I did upgrade the version to the latest

thats a great news! but we already moved s3 handling to backend side. thank you for letting me now! if you are sure that problems has been fixed i can close the issue.

aligurelli avatar Feb 26 '23 20:02 aligurelli

For me that was the fix, you can check it with your code if the problem is solved or not and also verify the ACCESS KEY and the SECRET KEY used

koukibadr avatar Feb 27 '23 07:02 koukibadr

I'm getting the same issue where I don't get any error message and it the string returned is null. So can anyone suggest any solution for that?

ghost avatar Apr 06 '23 03:04 ghost

Because this is null

https://github.com/Serdnad/aws_s3_upload/blob/master/lib/aws_s3_upload.dart#L113

shinriyo avatar Apr 29 '23 07:04 shinriyo

if (res.statusCode == 204) return '$endpoint/$uploadKey';

only 204 returns result.

shinriyo avatar Apr 29 '23 07:04 shinriyo

@Serdnad

are you still maintainance the project?

shinriyo avatar Apr 29 '23 07:04 shinriyo

I'll occasionally review and merge PRs made against this repo, but most of my work these days isn't around Dart/Flutter, so it's admittedly not a very high priority for me. @shinriyo

That said, I did notice you just opened a PR, I'll take a look. Thanks!

Serdnad avatar Apr 29 '23 07:04 Serdnad

I am having same problem. @Serdnad @shinriyo

Getting 400 Bad request.

bbig979 avatar May 02 '23 04:05 bbig979

Still, is there any official fix, I'm having the same problem.

levi956 avatar May 23 '23 23:05 levi956

Apr 6, 2023

same issue happened with me did you get any solution?

nishantmandal avatar Aug 09 '23 15:08 nishantmandal

Same issue

rajpalanand avatar Sep 21 '24 16:09 rajpalanand