Skip to content

🐛 Bug Report: Error in Storage API createFile function #963

@abhishek-visitnow

Description

👟 Reproduction steps

I'm trying to upload a file greater than 4 Mb. Following code is working when the size of file is less than 4 mb.

Using dotnet sdk v0.8.3

File myfile = await storage.CreateFile(
                 bucketId: "bucket-id",
                 fileId: ID.Unique(),
                 file: InputFile.FromBytes(
                     Encoding.UTF8.GetBytes(json),
                     "filename.json,
                     "application/json"
                     ),
                 permissions: permissions! // optional
             );

👍 Expected behavior

It should upload the file.

👎 Actual Behavior

Getting following error:

Appwrite.AppwriteException: The requested route was not found. Please refer to the API docs and try again.
   at Appwrite.Client.Call[T](String method, String path, Dictionary`2 headers, Dictionary`2 parameters, Func`2 convert)
   at Appwrite.Client.ChunkedUpload[T](String path, Dictionary`2 headers, Dictionary`2 parameters, Func`2 converter, String paramName, String idParamName, Action`1 onProgress)
   at DotNetRuntime.Handler.Main(RuntimeContext Context) in /usr/local/server/src/Index.cs:line 67
   at DotNetRuntime.Program.Action(HttpRequest request) in /usr/local/server/src/Program.cs:line 194

🎲 Appwrite version

Version 1.5.x

💻 Operating system

Linux

🧱 Your Environment

No response

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

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions