Back

Restarting interrupted upload

  • 0
  • Self Hosted
  • Cloud
Nevus
17 May, 2023, 16:44

A request to CreateFile endpoint with 12 MB file was interrupted. (12 MB cause it involves 3 requests with 5MB limit). I assumed to code at https://github.com/appwrite/sdk-for-python/blob/df2780464278185e9965134787dde5c92d163c37/appwrite/client.py#LL148C9-L157C31 to mean it supported resuming an upload. Using

TypeScript
from appwrite.client import Client
from appwrite.input_file import InputFile
from appwrite.services.storage import Storage

client = Client()

(client
  .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
  .set_project('testsdk') # Your project ID
  .set_key('api_key') # Your secret API key
)

storage = Storage(client)

result = storage.create_file(
    "testBucket",
    "6464fcd0546c5acd6237",
    InputFile.from_path('8MBFile.txt'),
)
print(result)

gives me an xml error:

TypeScript
<?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchUpload</Code><BucketName>cloud-fra1-prd-storage-2</BucketName><RequestId>tx0000000000000191d7e7a-0064650242-9655fb53-fra1b</RequestId><HostId>9655fb53-fra1b-fra1-zg02</HostId></Error>

Is this supported? I am using network logs from appwrite console to get file ID. I am using the cloud version of appwrite.

TL;DR
There is an issue with resuming interrupted uploads in Appwrite. The user tried to use the Python SDK but encountered an XML error. It seems that resuming uploads is not supported. The suggestion is to create a feature request on the Appwrite repository. No solution is provided in the thread.
Drake
17 May, 2023, 19:16

Interesting...i guess it's not supported. it might be good to create a feature request.

Nevus
17 May, 2023, 19:18

On the appwrite repo or the sdk-generator repo? To me looks like a lack of support on appwrite itself rather than python SDK

Drake
17 May, 2023, 19:19

best to create it on the appwrite repo

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more