Skip to content
Back

[Solved] Update filename once uploaded

  • 0
  • Web
  • Storage
Ajit Singh
17 Jul, 2023, 06:38

Can I update a filename once a file is uploaded in a bucket

I cannot see anythig like that in docs.

TL;DR
User is asking if it is possible to update a filename once a file is uploaded in a bucket. No solution is provided in the thread, but the user is encouraged to open a feature request for it.
Binyamin
17 Jul, 2023, 12:10

Not for now, the only solution would be to upload a new one.

Ajit Singh
17 Jul, 2023, 12:44

Is there a plan to support something like this

Binyamin
17 Jul, 2023, 12:48

I didn't find any mentaion of that being on some roadmap. You can create a feature request for it though.

The reason is not available to my opinion is because when dealing with Appwrite's Storage there's no meaning for the file name as the actions of

  • Accessing
  • Previeweing
  • Deleting Are sets by ID.
Binyamin
17 Jul, 2023, 12:48

BTW what was your use-case that you needed to have the rename option?

Ajit Singh
17 Jul, 2023, 15:52

@Binyamin I want to keep some files as archived. But I can't store any metadata in buckets so I want to give archived files special prefix to differentiate them

Binyamin
17 Jul, 2023, 15:52

Understood. Then for now, only opening a feature request.

Binyamin
17 Jul, 2023, 15:53

For a workaround, you can create another collection called archive in which you can add documents holds the storage files that have been archived.

Binyamin
17 Jul, 2023, 15:54

And,
If you want to make more flexible, you can create files collection contains each storage file meta data And, when the file is being archived move the document from files to c.

Ajit Singh
17 Jul, 2023, 15:57

Thanks makes sense I think adding metadata to files can be a great feature

Ajit Singh
20 Jul, 2023, 04:09

[Solved] Update filename once uploaded

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more