Open
Description
We've seen a couple of requests from Write.as Pro users to add a way to upload photos to Snap.as and have them added to posts.
On login, we could:
- If the instance's server URL is https://write.as, try to authenticate against Snap.as
- If Snap.as authentication works, set a new UserDefaults property,
isSnapAsUser
(or similar) totrue
Then, when presenting the menu, conditionally add an "Add photo" entry if isSnapAsUser
is true
. Tapping this would open the photo picker, and when the user picks an image, uploads it to Snap.as via the API. The returned URL is then pasted into the draft at the insertion point as a Markdown link.
Questions and Concerns
⚠️ We should probably block the UI during upload with an activity indicator overlay to prevent the user from continuing to type, and then being suddenly surprised when an image link is dropped into the text.⚠️ We'd have to periodically check that the user is still a Write.as Pro subscriber and, if they're not, unset theisSnapAsUser
setting in UserDefaults.- ❓ How should we handle multiple photo uploads (if at all)?