Skip to content

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
@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.

3 participants