Change file name with timestamp?

Hello,

Im working on project where would non-logged in users be able to upload an image to supabase and then with using API proceed to reverse image search it.

Problem im facing is there would be en error if two people uploaded an image with the same name.

Lets say “screenshot.jpeg”. So a freelancer i hired for building a Supabase storage came up with solution that we would add the timestamp in the filename so that the image would be named “screenshot_timestamp_value.jpeg”.

Screenshot 2024-02-02 at 19.43.35

Is it possible to do that in the WeWeb and if yes could someone please share how?
I am also opened to any other solutions for this problem.

It would mean a lot to me!:slight_smile:

Hello @Robyn,

With our date plugin, you can get a timestamp: Date formulas | WeWeb documentation

You should be able to concatenate the name and a timestamp to create a unique name for the file

Thank you Mael for your reply.

So if i implement a timestamp here in the Path formula would it be a right approach to save it in the supabase storage with updated name?

Yes that’s perfect!

Great, Thank you once again!