1
0
Fork 0
mirror of synced 2024-07-17 12:25:55 +12:00
appwrite/docs/references/storage/create-file.md
2021-07-12 16:08:01 +05:45

873 B

Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments.

Large file should be uploaded using multiple requests using content-range header to send partial request with maximum supported chunk of 2MB. We assume that the chunk size is the chunk size used in the firs request (may be different for last request.). We assume that in content-range header the range-start, range-end and size always sent and unit is always bytes.

When first request is sent the server sends back the File object, and the subsequent part request must include the file's id in x-appwrite-upload-id header for the server to know the partial upload is for existing file not a new file.