replicate/replicate-javascript

Request: support signed urls to be able to upload from the browser

Closed this issue · 2 comments

I think it'd be very good if we didn't have to send the image from the browser to the backend in order to allow safely uploading it to replicate.

I'd like to get a signed url on the backend that I can then grab in the frontend and post my image there and get the predictions back!

It'd make inference way faster, thanks!!

Hi @mikealche, thanks for the feature request. Currently our file storage offering is intended as a low friction way of allowing our SDKs to provide local file objects included in inputs seamlessly to Replicate.

I can see that the browser/server component adds friction here. By breaking that flow into parts you'd likely be better off using a dedicated cloud storage provider like AWS, Google Cloud or CloudFlare. I'll be sure to pass the feedback onto the team though.

As an alternative solution, we are also looking into supporting temporary/ephemeral tokens for use in browser applications, which I think would also solve the problem you're describing by allowing the entire API call to be done from the browser.

I'm going to close this issue for the moment as this is an API request, and I've passed the details onto the product team. If you have further questions or need clarification please re-open the ticket. Thanks!