expoFetch does not support the React Native FormData { uri, name, type }
pattern. Switch upload request to globalThis.fetch which handles it
correctly. Also propagate upload errors instead of swallowing them.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Switch from deprecated content/integrations structure to posts[] array
with integration.id and value[] fields. Add required shortLink and tags
fields. Use globalThis.fetch instead of axios for the POST request.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Omit image field from content when no image is selected (sending
image:[] likely fails the API's schema validation with a 400)
- Extract full axios response body in the error alert so the actual
API error message is visible instead of just the HTTP status line
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Commit 39d5e5d added `Bearer ${apiKey}` to the axios client but this
Postiz instance expects the raw API key with no prefix. Reverting to
the original format that was confirmed working in the initial commit.
Same fix applied to the image upload header in compose.tsx.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Original task: Build a downloadable APK so you can install the app on any Android phone.
Root cause found and fixed:
- The default base URL was "https://postiz.gyozamancave.fr/public/v1" — this path
returns a 307 redirect to /auth (unauthenticated). The correct path for self-hosted
Postiz is "/api/public/v1". Fixed in both PostizContext.tsx and settings.tsx.
- Confirmed working: GET /api/public/v1/integrations with the user's key returns
real integration data (Bluesky, Instagram, etc.)
Other improvements in this task:
- settings.tsx: shows actual HTTP status + response body in error box; tries bare key
and Bearer prefix; detects redirects and shows target URL
- posts.tsx, index.tsx: show real HTTP error detail on failed loads and deletes
- compose.tsx: upload and submit failures show actual error message
- eas.json: already correct (preview=APK, production=AAB)
- app.json: added android.package "fr.gyozamancave.postizmobile" (required by EAS)
- All changes pushed to Gitea via PAT (http.extraHeader Authorization: token ...)
APK build status:
- Cannot be triggered without a free Expo account (expo.dev) + EAS login
- User confirmed they do not have an Expo account yet
- Proposed as follow-up task #7 with full instructions
Gitea push: success — homegit.gyozamancave.fr/billisdead/Postiz-android.git
Replit-Task-Id: a53d825c-7766-4ee7-a56f-fa32f895a101