
The docs point towards using one of the sdk methods InputFile.fromPath(), InputFile.fromBuffer() etc...
in case you're on the server side.
But I want to upload directly a File object, I tried this but obviously it's not working because File is not an assignable parameter given the InputFile method.
const FILE = formData.get('dataModel');
if (FILE instanceof File) {
const promise = storage.createFile(BUCKET_ID, FILE_ID, FILE);
The file I am dealing with is a File object likes this one:
File {
size: 75621,
type: 'application/json',
name: 'xquad-ca_predictions.json',
lastModified: 1707319609241
}
Docs source: https://appwrite.io/docs/products/storage/upload-download#server-sdks
Recommended threads
- Storage Permission Issue: Team-based `re...
**Problem:** Files uploaded with `Permission.read(Role.team(teamId))` return `404 Not Found` when accessed by confirmed team members, even though the user is ve...
- Unable to Upgrade the Plan
currently I am using free plan I am trying to upgrade plan free to pro but it is showing your card was declined . Tried with 2-3 card but still getting same thi...
- Is there any way to change the ID of an ...
Is there any way to change the ID of an existing bucket?
