
I am trying to manage the user generated content such as images, videos etc in my appwrite storage so by every user registration i create a bucket for that user and from this point how can i manage the user data i mean in a normal scenario i would have different folders for each like images, videos etc how it works in appwrite sorage i can just have buckets and inside it all the file so i dont see the opportunity to do it folder wise so how can i manage all the stuffs per user.

Hi

You can try creating separate buckets during registration ( a suggestion) and have internal naming system defined by you for your own file structure - like adding prefixes for the files uploaded and/or adding a unique identifiable key to different users. You can use our https://appwrite.io/docs/client/storage?sdk=web-default#storageListFiles for listing

by adding a adding a unique identifiable key you mean while uploading the file i should also set some metadata to it and the search through a specific metadata?

In order to store files of a particular user you can create storage bucket for every user while your user registration using cloud functions and then you can manage that storage bucket for individual users files

First i need then to set the bucket id the user id? And second how would then the file name structure of all different user contents look like?

Yes you can set the user id of a user as their storage bucket id and add all files of that user to that particular storage bucket. And to get all of the files of a user use the ListFiles method

Hope this answers your question

yes thank you alot @Asutosh.

[SOLVED] Managing uploaded files per user in Appwrite Storage
Recommended threads
- Web SDK chunk upload to Storage without ...
As discussed in this older thread (https://discord.com/channels/564160730845151244/1216821517749321808), the Read permission for Any needs to be enabled in orde...
- Storage getFilePreview for GIF file retu...
Used to work in 1.6.x but with 1.7.4 upgrade it seems to be broken.
- CORS errors with storage bucket
I have a javascript file in the storage bucket and I used the view endpoint in an `src` attribute of a `<script>` tag. But I am getting the `net::ERR_BLOCKED_BY...
