Update Moogo | Receipt uploads are now fixed and production-ready: images are uploaded as raw binary through the Moogo SDK (auto-published), and the resulting receipt_url is saved to the DB. @moogodev
That code is the Moogo bucket upload function :
- bucketUpload(key, body, contentType) — sends a file to Moogo's object storage.
- key — the destination path (e.g. receipts/user/123.jpg).
- body — the actual file data (raw binary, not JSON).
- contentType — the file's MIME type (e.g. image/webp).
- fetch(...) — POSTs directly to Moogo's bucket endpoint with the raw file bytes.
- STORAGE_HEADERS — adds the two required auth headers (access key + secret).
- encodeKey(key) — URL-encodes each path segment so slashes stay intact.
commit 41f87d6