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

GetFileDownload returns a string without Project parameter. #14

Closed
Tracked by #557
Pastajello opened this issue Jul 21, 2021 · 3 comments
Closed
Tracked by #557

GetFileDownload returns a string without Project parameter. #14

Pastajello opened this issue Jul 21, 2021 · 3 comments

Comments

@Pastajello
Copy link

Hello.

So Im trying to use some Storage methods in functions.

So Im trying to use GetFileDownload to finish my work on .net sample function for object detection.
From documentation it creates link like this:
/v1/storage/files/{fileId}/download

for link generated by the Storage class:
http://localhost/v1/storage/files/60f85fa05c655/download?
I get a response :
"{"message":"Missing or unknown project ID","code":400,"version":"0.9.1"}"

BUT works for
http://localhost/v1/storage/files/60f85fa05c655/download?project=60f85f2973fd8

🐛 Bug Report

Have you spent some time to check if this issue has been raised before?

Yup.

To Reproduce

Call
var url = Storage.GetFileDownload("id")

Expected behavior

I'd either:
-get downloaded bytes (the OKeiest solution :D )
-get a request with api_key/projectId in headers and parameters(such as quality) as parameters
-get a string with everything as parameter

Actual Behavior

get a string with parameters but without projectID which is necessary to actually access the file we want.

Your Environment

Appwrite 0.9.1
Appwrite sdk for .net 0.2.0

@Pastajello
Copy link
Author

Its quite evedent that the projectId and api_key(not needed maybe sometimes only) are commented out in the method.
https://github.com/appwrite/sdk-for-dotnet/blob/main/io/appwrite/src/Appwrite/Services/Storage.cs#L154

Why? I wonder If the aim was to create a Request containing the projectId in the headers instead of string.

@TorstenDittmann
Copy link
Contributor

The .NET SDK will receive some love again soon. For now it wasn't a priority and we haven't been able to bring it on par with the other SDK's.

@abnegate
Copy link
Contributor

abnegate commented May 3, 2024

This is fixed in v0.4+

@abnegate abnegate closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants