Hey guys, I've been using Appwrite quite a bit for the database and realtime features but not much in storage.
However, I'm currently working on a project where I would only like to use Appwrite for the Storage bucket similar to S3.
Would need to know if this is possible. Would need two things.
- Upload image from the Web SDK without any user from Appwrite
- Retrieve image URL from Server using nodeJS SDK and pass a valid link to the frontend
Any help is welcome. Thanks in advance!
Sure thing!
You can use Appwrite for the storage bucket and achieve the following:
- To upload an image from the Web SDK, create a new instance of Appwrite, set up a file object and use the Storage API to upload the file.
- To retrieve an image URL from the server using the nodeJS SDK, create a new instance of Appwrite, use the Storage API to get the file download URL and pass it to the frontend.
Hey thanks for the reply.
So it's fine if I don't have users on Appwrite but use the Web SDK to upload the image and the Server NodeJS SDK to access the image?
Just to add on. If I try to use the Web SDK to upload files, I get the following error
AppwriteException: The current user is not authorized to perform the requested action.
Probably you should set permission for your bucket for any role
@Omnificent Yeah @AndrewIAm Cleared that You may need To update permission for your bucket To (Any) So any One can Upload in it
Recommended threads
- Realtime api and labels as permission
in my tables i set labels as permission and real-time capabilities stopped working. Before when i was having "any" role everything was working. Note: user have...
- "Restore project" button fails: "Invalid...
In the dashboard, it clicking "Restore project" fails. The request sent to `PATCH https://cloud.appwrite.io/v1/projects/:project_id` with payload `{status: "act...
- how to access the value of account statu...