You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't upload a file to S3. Can't see the problem. #2655
// CLIENT CODEString? uploadDescription =await client.X.getUploadImageDescription();
if (uploadDescription ==null) return;
final image =File(state.compressedImagePath!);
print("Attempting upload: ${image.path}");
finalStream<List<int>> stream = image.openRead();
final fileUploader =FileUploader(uploadDescription);
bool uploaded =await fileUploader.upload(stream, image.readAsBytesSync().length);
print("Was uploaded $uploaded"); // Always FALSE, nothing on the S3// bool uploaded = await client.X.verifyUpload();
I get the uploadDescription, looks ok, the image that I'm trying to upload is 8kb. I wish it wasn't a true/false but an Exception with some message what comes from upload method. I don't know what I'm doing wrong.
I think I have followed the docs very meticulously, still can't upload there. I have set the S3 private with a CloudFront, and this at the server side:
After debugging I get the error: <Error><Code>AccessControlListNotSupported</Code><Message>The bucket does not allow ACLs</Message>
With statusCode 400, but if ACL is not allowed in my bucket it shouldn't try to upload with ACL.
I don't know if it's my fault or this case is not contemplated by serverpod.
The SDK is missing the public parameter when retrieving the file descriptor. I'm too lazy to submit a PR, but hopefully this will get fixed eventually.
Activity
LeonidVeremchuk commentedon Jul 16, 2025
The SDK is missing the public parameter when retrieving the file descriptor. I'm too lazy to submit a PR, but hopefully this will get fixed eventually.