
Hello again, following the docs (https://appwrite.io/docs/products/storage/upload-download) using http im unable to upload/create a file, i got this error:
{"message":"Param \"fileId\" is not optional.","code":400,"type":"general_argument_invalid","version":"1.4.13"}
this is what im trying to construct:
// Set the required headers
data.headers = {
'Content-Type': 'multipart/form-data; boundary=cec8e8123c05ba25',
'X-Appwrite-Project': 'xxxxxxxxxxxxx'
};
// Build the form data
var formData = new FormData();
formData.append('operations', JSON.stringify({
query: "mutation CreateFile($bucketId: String!, $fileId: String!, $file: InputFile!) { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file) { id } }",
variables: {
bucketId: "yyyyyyyyyyyyyy",
fileId: "unique()",
file: null
}
}));
formData.append('map', { "0": ["variables.file"] });
formData.append('0', data.files[0]);
// Set the form data in the request
data.formData = formData;
}```
what im missing?
i already tried to set a `fileId` manually but same error occurs
Recommended threads
- PR: Updating bun runtime in Openruntimes...
I think I followed contribution guidelines well, just wondering if we can merge these so we can use Bun 1.2+ in the runtimes, and maybe as build tools for sites...
- Not received a waiting list email confir...
So, I've signed up for sites waiting list, but i did not recieved any email confirm, is this an issue? is it well set? So, how long takes to get access to this ...
- Confused whether to use GDrive or Appwri...
I am making a blogging site. right now I'm using GDrive to host the blog post's banner + inline images. my thinking was that since GDrive has 15GB storage I sho...
