View previous topic - View next topic |
Author |
Message |
cyberdivision
Posts: 591
|
Posted: 24 Mar 2024 05:01 initial question | |
|
Code: |
javascript:(function(){var e=document.createElement("input");e.type="file",e.onchange=function(){var t=new FormData;t.append("files[]",this.files[0]);var n=new XMLHttpRequest;n.open("POST","https://files.offshore.cat/api/upload",!0),n.setRequestHeader("x-api-key","CuDZ6qQzscE50ITu8HsH94IaQT05ieD7fOvRkUyAnh1BI6e6ujwWoTWKjLowB6MY"),n.onload=function(){if(200===n.status){console.log("File uploaded successfully!");var e=JSON.parse(n.responseText);alert("Uploaded file link: " + e.url)}else alert("An error occurred while uploading the file.")},n.onerror=function(){alert("An error occurred while uploading the file.")},n.send(t)},e.click()})();
|
Save the code as a bookmark to have this feature directly on your browser. |
|
Back to top |
|
 |
|
|
Set bookmark for this topic
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
Webboard.org is choosing the fastest connection for you.
server slots: 232/500 |
server load: 25% |
Webboard.org |
server time: 0.11s |
board activity: 3667 |
|