anyone have a code snippet to upload

anyone have a code snippet to upload from react-native using axios, fetch, or whatever, to a pre-signed R2 url? I have tried everything and every single time the file is invalid
1 Reply
ianh
ianh•4w ago
have tried: - b64 with axios put - blob + axios put - convert to buffer and axios put - multipart + fetch POST every single example puts the correct size, content type, but the image is always invalid on R2 even chatgpt can't figure this out ok - taking base64 -> Buffer.from and axios.put works. example on the docs would be 💯, since all examples are wrangler cli based