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

Fix: byte array check to fix GetFileDownload function in .NET SDK #765

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

adityaoberai
Copy link
Member

What does this PR do?

Corrects the byte array check in the .NET SDK to prevent GetFileDownload/Preview/View functions from returning null values

Test Plan

  • Generate new .NET SDK

  • Verify correctly generated code in Call() function in Client.cs
    image

  • Use newly generated .NET SDK with the following C# code

using Appwrite;
using Appwrite.Services;

var client = new Client();
client
    .SetEndpoint("http://cloud.appwrite.io/v1")
    .SetProject("[PROJECT_ID]")
    .SetKey("[API_KEY]");

var storage = new Storage(client);

var download = await storage.GetFileDownload("[BUCKET_ID]t", "[FILE_ID]");

File.WriteAllBytes($"output-{Guid.NewGuid()}.png", download);

Related PRs and Issues

No

Have you read the Contributing Guidelines on issues?

Yes

@adityaoberai adityaoberai requested a review from abnegate January 31, 2024 11:33
@abnegate abnegate merged commit 23fae03 into master Jan 31, 2024
34 of 36 checks passed
@abnegate abnegate deleted the fix-dotnet-sdks branch January 31, 2024 12:34
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

Successfully merging this pull request may close these issues.

2 participants