Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return Result Object From Upload #11

Closed
MelbourneDeveloper opened this issue Aug 14, 2023 · 3 comments
Closed

Return Result Object From Upload #11

MelbourneDeveloper opened this issue Aug 14, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@MelbourneDeveloper
Copy link

Feature request

The Upload method on IStoreFileApi needs an IsSuccess flag and an error message.

Is your feature request related to a problem? Please describe.

I'm uploading files to a bucket, and the method is returning the path. However, the file never shows up in the bucket. Actually, I cannot upload files at all with this method. Clearly, the file is failing to upload, but I have no idea why.

Describe the solution you'd like

The Upload method should return a response model, like that in the other clients, and it should give an error to explain what went wrong. I've burned hours trying to upload a file and I still have no idea why it never shows up on the other side. It's probably just a permissions issue, but I have no feedback to tell me.

Describe alternatives you've considered

I can only think of using the JavaScript client instead.

@MelbourneDeveloper MelbourneDeveloper added the enhancement New feature or request label Aug 14, 2023
@acupofjose acupofjose self-assigned this Aug 20, 2023
@acupofjose
Copy link
Contributor

Apologies for the delay in getting back to you, I've been out of town. You're right, it is likely a permissions issue, and agreed, the storage client is lagging a bit on feature parity with the supabase storage-js client. This is definitely an improvement we can make.

I'm going to transfer this issue to that repo so that we can track it there.

@acupofjose acupofjose transferred this issue from supabase-community/supabase-csharp Aug 20, 2023
@MelbourneDeveloper
Copy link
Author

@acupofjose Thankyou very much

acupofjose added a commit that referenced this issue Aug 26, 2023
…de checks on `Upload` and `Delete` methods.
@acupofjose
Copy link
Contributor

@MelbourneDeveloper okay. I implemented it a little differently than you requested, but the Upload and Download methods will now throw exceptions if you are unauthorized to access them.

If it returns the path, you should now be confident in the path existing. I will be creating a new minor release with the updates here shortly before pushing it to the main supabase-csharp repo.

Again, apologies for the delay. But thank you for the issue, helpful bug catching here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants