client: write a simple client for the pastebin
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
parent
cb8e210acb
commit
04c992e8b3
4 changed files with 19 additions and 7 deletions
|
|
@ -54,7 +54,7 @@ button[type="submit"] {
|
|||
border: none;
|
||||
padding: 0 1em 0 0;
|
||||
margin: 0;
|
||||
width: 70%;
|
||||
width: 50%;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
|
|
@ -206,7 +206,9 @@ AUTHOR
|
|||
},
|
||||
body: data
|
||||
});
|
||||
return response;
|
||||
|
||||
const text = await response.text();
|
||||
return text;
|
||||
}
|
||||
|
||||
// drag and drop files
|
||||
|
|
@ -221,7 +223,7 @@ AUTHOR
|
|||
|
||||
postData(url, blob)
|
||||
.then(data => {
|
||||
window.location.href = data.url + "." + ext;
|
||||
window.location.href = data + "." + ext;
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.info(err + " url: " + url);
|
||||
|
|
@ -243,7 +245,7 @@ AUTHOR
|
|||
|
||||
postData(url, blob)
|
||||
.then(data => {
|
||||
window.location.href = data.url;
|
||||
window.location.href = data;
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.info(err + " url: " + url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue