
I want to upload images to Appwrite buckets using Editor.JS It is very simple. This is what you have to do:
image: {
class: ImageTool,
config: {
endpoints: {
byFile: 'http://localhost:8008/uploadFile', // Your backend file uploader endpoint
byUrl: 'http://localhost:8008/fetchUrl', // Your endpoint that provides uploading by Url
}
}
}
}
However, I am not sure what to put in byFile or byUrl. So I did this:
image: {
class: ImageTool,
config: {
endpoints: {
byFile: 'https://cloud.appwrite.io/v1/storage/files?projectId=648bc5020fbda818412e', // Your Appwrite endpoint for uploading files
byUrl: 'https://cloud.appwrite.io/v1/storage/files?projectId=648bc5020fbda818412e&url=64ada07bbca91d21cdbc', // Your Appwrite endpoint for fetching files by URL
},
additionalRequestHeaders: {
'X-Appwrite-Project': '648bc5020fbda818412e', // Your Appwrite project ID
'X-Appwrite-Key': 'f3532846cc90b31dfa0d46ea92f7c5b56fab919f08e6fca87b4148a0576a5a962c1716a3dba8f140169bbddaad977c533cb58acece1380c4d4ce90eff638a037f667571af4d2f58d28ec6a033d1f8e3cb064a5a7599e6056ef1e75efe4d48e19f206a8ed925b7eca68788722dc5d7f17cc2bb129cb6ef3c73dbae96b0e02e2d3', // Your Appwrite API key
},
},
},
But it gives me this error:
{
"message": "Param \"fileId\" is not optional.",
"code": 400,
"type": "general_argument_invalid",
"version": "0.10.45"
}
Please help!

I apologize for the formatting.

I am getting a new error

Access to XMLHttpRequest at 'https://appwrite.io/v1/storage/files' from origin 'http://127.0.0.1:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

@Binyamin or @Steven Your help will be appreciated

please do not tag people directly as it can be very distruptive. pelase just post and wait for a response

okay

This looks interesting. If you won't find a solution I can look into it later today

I am sorry for pinging you guys
Recommended threads
- Can't download a file through the AppWri...
Heya! SO I am learning backend using Node.js. I am using AppWrite for storage, and in the application I want the files to be downloaded, which are stored by the...
- Vite build permission failed
im trying to deploy a react site using appwrite sites and it keeps failing to build ```2025-08-10T20:20:15.168371867Z [20:20:15] [open-runtimes] Environment pr...
- How to proper delete a serverless functi...
I tried `appwrite functions delete --function-id 12345`, it deletes the online one, but even after trying `appwrite pull functions`, the local one in the appwri...
