Uploaders
iPhone and iPad: upload with a Shortcut
How to build a Shortcut that uploads a photo or screenshot to hematite from the share sheet and copies its link: make a key, then six actions in Shortcuts.
This page as MarkdownOn an iPhone or iPad, a Shortcut of your own uploads to hematite from the share sheet: share a screenshot or a photo, choose hematite, and the link is on your clipboard. You build it once in the Shortcuts app, 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 iPhone and iPad, then Make key.
- Copy it. Press Copy. It's shown only this once; if you lose it, remove it and make another.
Build the Shortcut
In the Shortcuts app, press + for a new shortcut and name it hematite. Then add these actions, in this order:
- Receive input from the share sheet. Open the shortcut's details (ⓘ), turn on Show in Share Sheet, and let it receive Images only.
- Convert Image. Convert Shortcut Input to JPEG, with Preserve Metadata off. The camera's HEIC photos become something hematite takes, and the picture's location stays on the phone.
- Get Contents of URL. Set the address to
https://api.hematite.gg/v1/images, then open Show More:- Method: POST.
- Headers: add one,
Authorization, and paste your key as its value. - Request Body: Form. Add a File field named
file, with Converted Image as its value, and a Text field namedpwithshortcut.
- Get Dictionary Value. Get the Value for
data.shareUrlin Contents of URL. - Copy to Clipboard. Copy the Dictionary Value.
- Show Notification. Say
Link copied, so you know it's done.
Now share a screenshot or a photo, from Photos or right after you take it, and choose hematite in the share sheet. When it's up, the link is on your clipboard.
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.
- Up to 16 MB each, as JPEG. A photo from the camera at full size is well under it.
When the link doesn't come
If the clipboard holds nothing new, hematite refused the upload. Run the shortcut from the Shortcuts app on a photo and look at what Get Contents of URL returned: 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 picture is over 16 MB, or wasn't converted | Check the Convert Image action |
Your key
It lasts 90 days and counts toward your ten upload tokens. It's listed as Shortcut 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 Android, HTTP Shortcuts does the same.