Uploaders
Android: upload with HTTP Shortcuts
How to set up HTTP Shortcuts on Android to upload to hematite from the share sheet and copy each link: make a key, then one shortcut with a header and a file.
This page as MarkdownOn Android, HTTP Shortcuts, a free app, uploads to hematite what you share with it: share a screenshot or a photo, choose hematite, and the link is on your clipboard. You set it up once, with an upload key from hematite. Do it all on the phone, so the key is on its clipboard when you need it.
Make a key
- Open Uploaders. On the phone, sign in to hematite and open Settings → Uploaders.
- Get a key. Press Get key beside Android, then Make key.
- Copy it. Press Copy. It's shown only this once; if you lose it, remove it and make another.
Set up the shortcut
In HTTP Shortcuts, press +, choose Regular HTTP Shortcut, then Create from scratch:
-
Name and address. Name it
hematite. Set the method to POST and the URL tohttps://api.hematite.gg/v1/images. -
The key. Under Request Headers, press Add Header: Header
Authorization, and paste your key as its Value. -
The file. Under Request Body / Parameters, set Request Body Type to Parameters (form-data). Add a parameter with Parameter Type File, Parameter Name
file, and File Data Source Open File Picker. Then add a text parameter namedpwithhttp-shortcuts. -
Copy the link. Under Scripting, in Run on Success, put:
TypeScript copyToClipboard(JSON.parse(response.body).data.shareUrl); showToast("Link copied"); -
Quiet on success. Under Response Handling, choose Show nothing (run silently) for a success, so only the toast shows.
-
Save it. Under Trigger & Execution Settings, Allow receiving files from share dialog is on already: leave it so.
Now share a screenshot or a photo and choose HTTP Shortcuts, then hematite. When it's up, a toast says the link is copied. Run from the app's list instead, it asks you to pick a file.
How its uploads come out
- They take your upload settings: who can see them, when they delete themselves, how they're compressed. The link follows your link settings.
- PNG, JPEG, GIF and WebP, up to 16 MB. Some phones save photos as HEIF: hematite refuses those, so share a screenshot or a JPEG, or set the camera to JPEG.
When it fails
HTTP Shortcuts shows hematite's answer. Its message says why:
| It says | What it means | What to do |
|---|---|---|
| Authentication is required for this route. | The key is wrong, expired or removed | Make a new key and paste it into the header |
| Storage limit reached | Your plan's storage is full | Delete something, or see pricing |
| Request validation failed. | The file is over 16 MB, or isn't PNG, JPEG, GIF or WebP | Share a screenshot or a JPEG |
Your key
It lasts 90 days and counts toward your ten upload tokens. It's listed as HTTP Shortcuts on Settings → Uploaders and in Settings → Security. Remove it in either place and the shortcut stops uploading. To go on, make a new key and paste it into the Authorization header. On an iPhone, a Shortcut does the same.