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 raw #16

Closed
Natim opened this issue Jan 2, 2013 · 7 comments
Closed

Download raw #16

Natim opened this issue Jan 2, 2013 · 7 comments

Comments

@Natim
Copy link
Contributor

Natim commented Jan 2, 2013

A download button to see the paste as raw.

@sametmax
Copy link
Contributor

sametmax commented Jan 2, 2013

This is not possible the same way github does it: we don't have a raw file since everything is is encrypted.

Is putting it in a textarea enough ? In that case the clone button already does that.

If not, what do you need the raw form for so we can try to implement something close enough ?

@Natim
Copy link
Contributor Author

Natim commented Jan 2, 2013

I think the best way to implement this is to keep the mimetype of the uploaded file.
So on the raw button we can get the the file (download form) with the same content-type.

Then the browser will know if it can display it or ask for downloading.

@sametmax
Copy link
Contributor

sametmax commented Jan 2, 2013

I see. Yeah, it's an interesting idea. I have no time to implement that for now but I do like this idea (it's a wonderful complement to the upload button). If I find the time to work on 0bin again, I'll definitly add it to it.

I would also accept pull request for this (please just don't add another buttong, turn "clone" into a "more" pulldown.) if you need this quickly.

@Natim
Copy link
Contributor Author

Natim commented Jan 2, 2013

I may have some time on the middle of january but not this week, will see.

@sametmax
Copy link
Contributor

sametmax commented Jan 2, 2013

Cool !

@Natim
Copy link
Contributor Author

Natim commented Jan 19, 2013

Actually, the FileReader API provide a readAsDataURL then everything is already on. mimetype and base64 data that can be download.

I will transform the Clone button in Download button when looking at an image paste.

Natim added a commit to Natim/0bin that referenced this issue Jan 19, 2013
@Natim
Copy link
Contributor Author

Natim commented Jan 19, 2013

See #17 PR

@Natim Natim closed this as completed Jan 19, 2013
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

2 participants