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
- Payment error
While I was making the subscription for this month, I got the following.
- Appwrite Bucket use
I'm wishing to integrate Appwrite bucket storage into my project for storing documents directly from my server. I'm currently using appwrite free plan,and I'm...
- Image transformations
On flutter web, when using image transformations, the results are being cached. When I replace an image, the old version still appears. Is it possible to manual...