I saw in https://github.com/appwrite/sdk-for-python/blob/master/appwrite/id.py that the unique method returns the string "unique()". So made a REST API request to the cloud version of appwrite using fileId = "unique()". Now, I cant delete the file or open it.
What are you doing before you get this error? Can you share screenshot of that?
uploading file to the createFile endpoint using unofficial go sdk
I set the fileId to unique() but its being set to literal unique() instead of a random uid.
Okay,
What SDK you're using?
That's look fine
But how you get this one?
I set the fileId for https://appwrite.io/docs/server/storage?sdk=nodejs-default#storageCreateFile to unique()
Then that broke appwrite.
Okay?
So you have file with string id equals to unique()?
Yes.
It should have generated a unique random id but it didn't. Since, every other SDK uses the same process I am missing something. Just dont know what.
Okay, But this error is in the console, right? Is it show when you load the list?
ahh I think we are going in circles. Here's what happened.
- I created a file using CreateFile endpoint. The endpoint has a fileId parameter. The value for that was set to
unique() - The file upload succeded. The return value of json has
id: unique() - The file appears in console. However, it cannot be accessed, updated or deleted. This happens for all platforms: console, SDK and REST. I dont know GraphQL but there's no reason to suspect otherwise.
Yes, I can see the file but that's it. There's no way to interact with the file whatsoever except deleting the bucket itself.
Got you, okay.
Because you're using the cloud you can't access the DB directly and change the file ID manually. so you'll need to wait to an answer for that from a core <:appwrite:637383039499894787> user.
As for the understanding of the unique string you can see here
https://discord.com/channels/564160730845151244/1106476734704009256/1106490852316041257
So I was double checking to see if your ID is exactly unique() as this shouldn't pass this line.
https://github.com/appwrite/appwrite/blob/master/app/controllers/api/storage.php#LL439C20-L439C38
Last, the Go SDK has support of the ID function
https://github.com/Suven-p/sdk-for-go/blob/master/id/id.go#L8
The code doesn't quite match up with how our other SDKs work. It looks like unique() is being passed in the x-appwrite-id header which breaks things...Appwrite should probably block that from happening, so it would be good if you created an issue so we make sure this doesn't happen
The only way to resolve this delete the bucket?
ya i think so
Recommended threads
- Problem with Appwrite CLI: Removing data...
I'm having an issue with the CLI while trying to manage multiple databases within a single project. My goal is to simplify my local environment by only includin...
- Issue with Appwrite Read Request Limit b...
Hi Team, My coding terminal connected to the Appwrite CLI blew through my Projects Read request limit with in a day! and thats a large limit! I'm not sure how...
- Issue with email/password auth in Flutte...
is there an issue with Flutter auth right now? I am unable to login all of a sudden in my app with `createEmailPasswordSession`... when I go to verify the login...