Skip to content

verifyDirectFileUpload always returns false even when upload succeeds #2517

@lukehutch

Description

@lukehutch

I get an upload description and my client uploads a file to GCP Storage. If I look in the dev console, I can see that the file correctly uploaded to the right bucket.

However, when I use the same upload description and call verifyDirectFileUpload, the response is always false. There is no error message or exception.

I don't want to just ignore the return value -- what could cause this problem?

The Serverpod code that checks if an upload succeeded is simply:

  @override
  Future<bool> fileExists({
    required Session session,
    required String path,
  }) async {
    var response = await _s3Client.headObject(path);
    return response.statusCode == 200;
  }

so I assume a false response means that GCP is returning a status code other than 200. However this is the production server, so I can't just set a breakpoint here to check it.

It is quite urgent that I get this fixed, since I'm trying to push out my 1.0 release -- would appreciate any help with this. Thanks!

Metadata

Metadata

Assignees

Labels

area: storageIssues related to file storage.

Type

No type

Projects

Status

Backlog 🗂️

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions