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

Add text pasting #13

Open
Hattorius opened this issue Oct 22, 2024 · 1 comment
Open

Add text pasting #13

Hattorius opened this issue Oct 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Hattorius
Copy link
Owner

Hattorius commented Oct 22, 2024

Add a small text underneath the upload button with "pastebin instead?". Clicking it should redirect to "/paste.html". It should stay with the style of cipherdrop and feature a textarea for text input. This textarea value should be wrapped into a File and handled as a usual file. Please reuse the index.js file

@Hattorius
Copy link
Owner Author

This should really just be a separate page but the same javascript file. At the end it does exactly the same thing, it just requires a quick:

const content = "This is the content of the file.";
const blob = new Blob([content], { type: 'text/plain' });
const file = new File([blob], "snippet.txt", { type: 'text/plain' });

And process that file just like every other file

@Hattorius Hattorius added the enhancement New feature or request label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant