Ashutosh Bind
Ashutosh Bind2w ago

@erquhart I was going through the r2

@erquhart I was going through the r2 source code, as I wanted to impl file storage with s3 and I am relatively new to convex, For the getting the ps-url, you call a mutation, which at the end calls up the s3 command from the mutation itself and returns the key How are we able to do this, like weren't mutations not allowed to talk to external services, and actions were there for the same.. I might be completely wrong, any assistance would be helpful, thanks!
No description
2 Replies
erquhart
erquhart7d ago
generateUploadUrl doesn't actually make any external calls with r2, I suspect s3 works the same It just generates a url that can be called with a file to perform the upload
Ashutosh Bind
Ashutosh BindOP7d ago
"generateUploadUrl (Convex storage) and typical S3/R2 presign flows compute a signature locally using your credentials (and request params like bucket, key, method, expiry)." Just looked it up, didn't know this, thanks for the support!

Did you find this page helpful?