Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download "burn after reading" file #26

Open
molchalin opened this issue Mar 20, 2023 · 3 comments
Open

Download "burn after reading" file #26

molchalin opened this issue Mar 20, 2023 · 3 comments

Comments

@molchalin
Copy link

Problem:

  1. Create "burn after reading" file
  2. Open it
  3. Press button "Download"
    Result: 404
    Want: Download this file
@matze
Copy link
Owner

matze commented Mar 20, 2023

Hmm, content is deleted after the first GET, i.e. as soon as you open it. Once done, it's wiped from the database. Keeping it somewhat alive is possible but leads to an ugly architecture. How about adding a download link next to the open link?

@molchalin
Copy link
Author

I think there are two ways to go:

  1. Keep somewhere in localstorage file after get. On download you can just get store it to a file.
  2. As you said. Add download button to share page and remove "download" button for view.

I think that first approach is better. Because if you choose the second approach, you can get the same issue if you just press download button when the paste is already expired. But I don't know whether it's easy to implement

@kamaradski
Copy link

if i would be looking to solve this problem, i would start looking into a client side clipboard function, so to take the screen contents and put it in the user clipboard. This would be fairly easy with javascript for example.

however isn't downloading the content defeating the burn-after-reading effect? I mean it's no longer burned if it is allowed to exist on your hard drive. I know it's easy to grab content off a website/screen, but maybe don't make it too easy for endusers otherwise noone will continue to use the burn-after-reading feature.

I like the way it is right now, and if you want to keep the contents you have 3 easy ways to do it:

  • manually copy/paste the content out of the website into a document
  • instead of opening the url with your browser, use curl/wget to GET and dump the content into a file.
  • right-click the link and use "save as", and then read it from the saved file

Personally i read the OP post and think: That 404 is misleading and than go proceed to implement the following:

  • no longer display a download button for burn-after-reading items
  • change the 404 for items attempted to be downloaded after expiry to something more meaningful
  • and depending on the philosophy you want to follow you can add a "copy to clipboard" button on the 404 to grab the already downloaded content to memory

I think this is mostly a philosophical problem rather than a technical one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants