Another idea, which may require too much effort on the part of the user, is to show a unique token or url for each uploaded piece of content. The user can choose to store this and use it to edit the content.
Advantages: it's more anonymous, since there are no cookies to track users, and you can't even track which pieces of content are uploaded by the same user. The tokens also persist after clearing cookies or even reinstalling the PC.
Disadvantages: it's clearly quite some effort for the user to keep track of all the tokens.
P.s. it sounds like may use your service to upload nsfw or copyrighted content.... But maybe that's the point.
Hashnode is a friendly and inclusive dev community.
Come jump on the bandwagon!
💬 Ask programming questions without being judged
🧠 Stay in the loop and grow your knowledge
🍕 More than 500K developers share programming wisdom here
❤️ Support the growing dev community!
Even though they're anonymous users, generate a unique id for each user from the client side itself and save it in cookies with a long expiry.
Whenever someone uploads a file save that unique id along with the file. Now you can allow users to edit the file if its owner is the same as in the cookies.
You can use uuidv4 or something for unique ids
I'd at least make them type in an e-mail address if they want to edit. Generate an authorization code for editing, and send it to them that way. OR just display the edit authorization code when they create the file, they lose that code, well... that's their fault.
Any other method -- sessions, cookies, localstorage -- isn't portable or permanent.
Use a random code in the url (8 letters/digits should be enough) so that they can access their space on both desktop and mobile devices. It's kind of like mailinator.com where you can create fake email addresses. The only thing is that if you use an existing name, you can read the content of that user. Maybe that's ok for your use case?
The Dev Community
(Free, friendly and inclusive)
A network for software developers to learn new things and get insight into the world of programming