[Bug] Android SDK Storage would not upload files larger than 5 MB if the fileID is not unique
- 0
- Android
- Storage
- Cloud
What are the permissions on the bucket and files?
Create files only for any user.
I tested it and it seems to be the case on cloud console so... yeah not sure then
Btw, I mean "proper permissions" here as in the application have read and write access to the files inside the Android device itself. Which makes the "file not found" exception to be weirder.
So are you using the same file id for a file that already exists on the server already?
Some additional note: the fileID itself isn't the same for every file actually, but rather it was generated from timestamp in my system. I just put a variable in the code snippet to make it simpler
I tried doing that and it works fine on files smaller than 5 MB.
It's not my intention to put files with the same ID in the server though
I wanted to generate the fileID string from the timestamp when the file was created
However whenever I insert any strings other than ID.Companion.unique() on any file larger than 5 MB, this happens.
You said there was some loop uploading multiple files...but each file id you're generating is unique and doesn't exist on the server yet, right?
Yes
This appears to be more of an issue to the Android SDK itself rather than the server though
So what are the permissions on the collection and file that gets generated?
permissions are what I have expected to, yes.
Bucket: any users can create
What version of the android SDK are you using?
2.0.0
With file security on?
yes
only create
Please share the permissions on the created file
I apologize but I will have to do it later. It's already 5 am here and I have not slept.
Also, make sure you're using https for the endpoint.
Yeah I already use https since I use appwrite cloud
Recommended threads
- Cloud function deploy stucks in processi...
Been trying for the last hours to deploy my function but for whatever reason, alwasy stuck on processing!
- One-time Cloud migration blocked by data...
Hi, I’m blocked on a one-time migration from Appwrite Cloud to my self-hosted Appwrite instance. We already fixed the region issue, and the migration now corre...
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...