ux: paste to upload example template #94

Open
tomholford wants to merge 1 commit from tomholford/0x0:th/paste-to-upload into master
First-time contributor

This resolves #60 by providing an example template with a simple script that listens for paste events and POSTs the file blob to the current location.href.

This resolves #60 by providing an example template with a simple script that listens for paste events and POSTs the file blob to the current `location.href`.
tomholford added 1 commit 2023-10-03 08:41:55 +02:00
This resolves #60 by providing an example template with a simple script that listens for paste events and POSTS the blob the current location.href.
tomholford requested review from mia 2023-10-03 08:42:11 +02:00
sney reviewed 2024-07-10 23:27:46 +02:00
@ -0,0 +98,4 @@
if (response.ok) {
console.log("File successfully uploaded");
location.pathname = await response.text();
First-time contributor

Deployed this today. with location.pathname it appends the whole url to SERVER_NAME and generates a broken link, so this should be location.href instead.

Deployed this today. with location.pathname it appends the whole url to SERVER_NAME and generates a broken link, so this should be location.href instead.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u th/paste-to-upload:tomholford-th/paste-to-upload
git checkout tomholford-th/paste-to-upload

Merge

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff tomholford-th/paste-to-upload
git checkout master
git merge --ff-only tomholford-th/paste-to-upload
git checkout tomholford-th/paste-to-upload
git rebase master
git checkout master
git merge --no-ff tomholford-th/paste-to-upload
git checkout master
git merge --squash tomholford-th/paste-to-upload
git checkout master
git merge --ff-only tomholford-th/paste-to-upload
git checkout master
git merge tomholford-th/paste-to-upload
git push origin master
Sign in to join this conversation.
No reviewers
mia
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: mia/0x0#94
No description provided.