iOS Shortcut to upload photos/files directly to Cl...
# general-help
p
Did anyone build an iOS Shortcut to upload images directly from Photos to R2 🤔 For example, Upload images (absolutely compress in JPEG), videos (less than 10s), files (smaller than 5Mb) to R2 with iOS Shortcut only. Just tap in Shortcut, pick Photo/Video/File and wala Shortcut reply with direct url of them. I think this is would be great for anyone want to write blog post or discussing on Forum. What do you think? Would it possible currently accordding to which Cloudflare R2 provide?
c
I don't think directly from a shortcut is possible as I don't think the S3 api works from it. There are probably file browser apps that support browsing and uploading to an S3 service
p
Could we go through it with Workers? something like this https://stackoverflow.com/questions/73943907/cloud-flare-r2-how-to-upload-images
e
Yes, if you create a Worker (preferably with auth) that puts the uploaded file into R2, you can use this Shortcuts function to send the file to the worker

https://cdn.discordapp.com/attachments/1110395283570962505/1110477019742998548/IMG_2296.pngâ–¾

Keep in mind that by default theres a limit of 100mb upload per request
The worker can then also use the filename to create a public url and return it to the device
p
Thank you so much. I will try to create it and share here for anyone need it
3 Views