Skip to content

Instantly share code, notes, and snippets.

@kaecy
Last active December 27, 2015 22:49
Show Gist options
  • Save kaecy/7401701 to your computer and use it in GitHub Desktop.
Save kaecy/7401701 to your computer and use it in GitHub Desktop.
Push pictures to puush.me through a web browser.
<html>
<body>
<h2>Upload a picture</h2>
<form enctype="multipart/form-data"
action="http://puush.me/api/up" method="post">
Key: <input type="text" name="k">
<input type="file" name="f" accept="image/jpeg,image/png">
<input name="z" value="poop" style="display:none"> <br><br>
<input type="submit">
</form>
</body>
</html>
// add this to greasemonkey
var feedback = document.body.innerHTML.split(',');
if (feedback[0] == '0')
document.body.innerHTML = "<h2>SUCCESS<h2>" + feedback[1];
else document.body.innerHTML = "<h2>FAILURE</h2>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment