root-gg / plik

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

"Destruct after the first download" not working with messenger apps #365

Open paulkitt opened 3 years ago

paulkitt commented 3 years ago

When using the "Destruct after the first download" option and sharing the link via Slack, Mattermost or Signal the download gets destroyed. The messenger apps try to render a preview which counts as a successful download in plik. My guess is that its the same with Telegram, Whatsapp, etc

It would be very great that the download gets deleted after the whole file is transferred successfully. A quick fix would be to have small site for each download with a start download/stream button.

We also had users surprised that the download was gone after they clicked the Cancel button in the download box in their browser. Changing/Fixing this would solve both problems :)

paulkitt commented 3 years ago

The streaming option has the same problem. When sharing the file link with a messenger the preview is starting the stream download.

camathieu commented 3 years ago

For the one shot it should be possible to restore the file status if the io.copy errors (with the potential security issue that the file can easily be downloaded until content-length - 1 an unlimited amount of time)

Here : https://github.com/root-gg/plik/blob/b0f32d39daf56195415004429815ddc147c5ab45/server/handlers/get_file.go#L119

However for the stream mode there would be a need to implement a retry mechanism in the client side as well as patching the server side like described above.

On Wed, 4 Aug 2021, 17:41 Paul Kitt, @.***> wrote:

The streaming option has the same problem. When sharing the file link with a messenger the preview is starting the stream download.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/root-gg/plik/issues/365#issuecomment-892764965, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ5XPUUC4HD6MZVVH4YTUTT3FNULANCNFSM5BRM5B2Q .

paulkitt commented 3 years ago

Thanks for the quick reply. Sadly I am not a go developer and cant contribute to the project in this way :disappointed:

camathieu commented 2 years ago

See also : https://github.com/root-gg/plik/issues/281

tvelvet commented 2 years ago

same here. :( i really love plik tho. :) make my life easier.

is it not possible to change how many times a streamed file can be downloaded? i can't really send the link via messenger, webex, team and others. Or have to obscure it somehow. :) it works on fibridge and drop-it. https://github.com/Orange-OpenSource/just-drop-it https://github.com/anderspitman/fibridge-proxy-rs

acuteaangle commented 11 months ago

For anyone else finding this, here are two workarounds (that have made this a non-issue for my use case at least, and hopefully yours as well):

For direct links (plik.domain.tld/file/\/\), you can enable the password option and send the credentials along with the link. It will only burn your stream/autodestruct with the correct credentials, so application previews, email tracker protection, etc. won't interfere with it.

For indirect links (plik.domain.tld/?id=\), every application I've tested worked fine – nothing crawled through to the direct links for the file(s).

Perhaps some information could be added to an FAQ/docs/tooltip somewhere?