nokonoko / Pomf

Simple file uploading and sharing, source for the now shut down site Pomf.se
MIT License
463 stars 98 forks source link

Provide temporary file storage #11

Closed zebracanevra closed 9 years ago

zebracanevra commented 10 years ago

If I know my file is not going to be needed permanently, I should be able to specify a deletion time (hours/days/weeks/months).

For most of the files I share I don't want them to take up unnecessary space after I've forgotten about them. You probably already delete files after they aren't downloaded for a while, but to be able to specify an even shorter amount is always helpful to free up space.

An extension upon this temporary storage would be not to specify a deletion time, but rather something like a 4chan thread, and the file will be deleted after that thread 404s. This would be rather easy to check every hour by just using a HEAD request to save bandwidth. If the thread stays alive for longer than X days (e.g. threads on slow boards and/or stickies), then you stop checking the thread and just let the file stay there until it is deleted for inactivity.

zebracanevra commented 10 years ago

I realise you have advised using other services like http://volafile.io/ in the past but I'd rather not have to create a 'room' to share files or anything. You already have an 'expire' column in the database, so I guess that you already had some sort idea to implement this feature.

NuckChorris commented 10 years ago

This has been in the works for a long time, and honestly it's mostly hinging on me writing the code to pass it through the JS layer.

I really dig the idea of temporary files which get deleted when a url 404s though. Great concept.

tengwar commented 9 years ago

+1. Sometimes I need a file for few days only and I don't want to litter the server, but 1h (as on uguu.se) is often too short. You could have few default values, like pastebin: 10min, 1h, 1d, 1w, 2w, 1m.

nokonoko commented 9 years ago

I made uguu.se for this instead, I will up the storage time soon.