root-gg / plik

Plik is a temporary file upload system (Wetransfer like) in Go.
https://plik.root.gg
Other
1.43k stars 167 forks source link

[Feature Request] add read-only share-url #430

Closed tionis closed 2 years ago

tionis commented 2 years ago

Add a read-only share-url so that each time you generate a share you get a read-only url which only allows listing files and downloading them and a read-write-url which allows changing the share like normal.

camathieu commented 2 years ago

Hello @tionis,

I think this feature already exists. When you create an upload you get the UploadToken. If you pass the token you get read-write rights for this upload if you don't then you will get read only rights.

For example upload a file on plik.root.gg (while not being authenticated). You will be able to add/remove file to the upload but as soon as you refresh the page you'll lose the UploadToken and you will not be able to perform those actions anymore.

If you want to keep the read-write permissions you can use the "Admin URL" button to add the UploadToken to the URL, then refresh the page with this URL and you'll still have the read-write permissions.

image

tionis commented 2 years ago

I see, do you know which version plik.root.gg runs on?
I'm using the docker container and don't have the token as seen at plik.root.gg

camathieu commented 2 years ago

It runs a dev build only a few commits behind master at : be8915d448e7415fee22c9126002f4be8b665a43 (1.3.5+)

https://plik.root.gg/version

camathieu commented 2 years ago

What version of the docker image are you running ?

The UploadToken feature is really not recent. Also it's unlikely that it is a web browser issue if it works on plik.root.gg and not on your env.

tionis commented 2 years ago

Ok, weird I will have to investigate this later, my instance is at https://yeet.digital, I guess we can consider this closed then?

camathieu commented 2 years ago

I did a test on your instance and it seems to work :)

Read Only : https://yeet.digital/#/?id=NyO2yQIPzUxIcypV

Read Write : https://yeet.digital/#/?id=NyO2yQIPzUxIcypV&uploadToken=7gHETjogqZdxaMzr5QlgoImp2OcKimC7

tionis commented 2 years ago

Ah yes, it works great, thanks!

camathieu commented 2 years ago

You are very welcome.

On Tue, 10 May 2022, 10:25 Tionis, @.***> wrote:

Ah yes, it works great, thanks!

— Reply to this email directly, view it on GitHub https://github.com/root-gg/plik/issues/430#issuecomment-1122085366, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ5XPWOXLPNIHEX7GTJNNLVJIMQLANCNFSM5TD6ARSQ . You are receiving this because you modified the open/close state.Message ID: @.***>