Xenthys / ShareXen

ShareXen - Another ShareX Custom Uploader PHP Script
MIT License
102 stars 22 forks source link

Per-user folders #12

Open soren11 opened 3 years ago

soren11 commented 3 years ago

Is it possible to delete all (of a single) users files?

soren11 commented 3 years ago

If this is not possible, how would one upload files to the directory of their username?

Xenthys commented 3 years ago

Hello, it is not possible for the API to know which file belongs to whom, it has no database and doesn't keep any kind of record anywhere unless you use a Discord webhook.

In such a case, the workaround would be to use a bot fetching all the messages in your log channel, extract all the filenames that were created by the user, then run a loop to delete them all… you guessed it, that's not practical at all nor recommended in any way.

Regarding the per-user folders, this is not (yet) possible but since you're the 2nd person to actually request that feature, I'll try to add it along with the other improvement I am thinking about. I'll keep this issue open and reference it when I commit said feature.

soren11 commented 3 years ago

Alright, Thanks.

wolfier74 commented 3 years ago

This is really good idea. Per user folders. The image url should look then like www.mydomain.com/user/image.png , you don't need any bot that will be fetching messages from log channel. it does not matter that it will be not www.mydomain.com/image.png This feature should be optional