What are the permissions on the bucket and files?
[Bug] Android SDK Storage would not upload files larger than 5 MB if the fileID is not unique
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 1: Thread
Create files only for any user.
Rank 1: Thread
I tested it and it seems to be the case on cloud console so... yeah not sure then
Rank 1: Thread
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?
Rank 1: Thread
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
Rank 1: Thread
I tried doing that and it works fine on files smaller than 5 MB.
Rank 1: Thread
It's not my intention to put files with the same ID in the server though
Rank 1: Thread
I wanted to generate the fileID string from the timestamp when the file was created
Rank 1: Thread
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?
Rank 1: Thread
Yes
Rank 1: Thread
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?
Rank 1: Thread
permissions are what I have expected to, yes.
Rank 1: Thread
Bucket: any users can create
What version of the android SDK are you using?
Rank 1: Thread
2.0.0
With file security on?
Rank 1: Thread
yes
Rank 1: Thread
only create
Please share the permissions on the created file
Rank 1: Thread
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.
Rank 1: Thread
Yeah I already use https since I use appwrite cloud