Replies: 2 comments
-
Using microfeed API to upload files, you'll do two things:
Learn more: https://www.microfeed.org/json/openapi#tag/Admin-API/operation/apiGetR2PresignedUrl If you encounter any errors, please post here so we'll have more contexts to help troubleshoot. Curious - if you just want to upload files to R2, why not use Cloudflare's s3/worker API directly? https://developers.cloudflare.com/r2/api/ |
Beta Was this translation helpful? Give feedback.
-
Thanks @wenbinf for the offer of help. I've used the information in openapi.yaml beginning line 261 to get a presigned URL and it works when I have a local file path or URL. When I select a video file from my local machine, I get a FileList object, not something I can use as a Unfortunately, I haven't been able to grok the code behind It looks like R2 and the Cloudflare Stream and Images products were made for two different audiences, R2 being a lot more technical; it assumes one has knowledge of Workers and AWS. Microfeed embodies all that and I wish I could integrate it. Sure, the product is ideal for an individual podcaster with a "need for feed" but the potential is there to do more, as others have suggested. It happens that an open source project seems almost usable but not really, because of language or other stack issues. But Microfeed could be the missing piece that's delaying release of my system. I'm impatient to give all my users their own Finally, I wouldn't say that I "just" want to upload files to R2. I want to do it the right way... |
Beta Was this translation helpful? Give feedback.
-
I've built a plain JavaScript/JQuery social curation site that allows members to upload media. It uses Firebase Auth and Realtime Database, and now the Microfeed API to load images and documents but I'm stuck with Cloudflare Stream for videos. That's because I haven't figured out how to get a user's video from their files or from their phone into R2 using the Microfeed API. I can upload a video to Stream and then hand Microfeed the URL (as
full_local_file_path
) and delete the original from Stream, but I wouldn't do that in production. On the plus side, you get the thumbnail for free but have to wait for processing and a webhook to show the user their work.The Microfeed admin website seems to work differently from the API, as the video moves directly to R2 (cool progress indicator!), whereas the API takes a URL or local file path. I've struggled with this for too long already!
Long story short, I need Microfeed's
/admin/items/new/
page in plain JavaScript... I can't integrate the Microfeed JSX into my site, and/admin/items/new/
does exactly what I need.I'm looking for help or at least ideas... or make me an offer: dev@feedbag.org
Beta Was this translation helpful? Give feedback.
All reactions