
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
- Constant 404 Pages
Whenever I am navigating through items and pages to go through my collections and database I end up at a page that sends me a 404 error, if i refresh it remains...
- implement caching
It it possible to cache response for few minutes? I dont want to create function or implement a whole reverse server just to cache it in somewhere ?
- I am getting a 401 unauthorized response...
I have a Next.js application that stores user PDFs. I'm able to save them normally, but when trying to access the files using getFileView, I get a 401 Unauthori...
