Roberto
Roberto
Explore posts from servers
RRunPod
Created by Roberto on 8/22/2024 in #⚡|serverless
How to deploy flux.schnell to serveless?
Title says it all Would be nice to have a guide on how to setup flux on a serverless endpoint also, I'm planning to train some loras and store them for future use should I save it in network volume? would be a plus to have some guidance on how I can accomplish this as well
8 replies
CDCloudflare Developers
Created by Roberto on 8/19/2023 in #workers-help
How to upload a zipfile to R2?
I'm trying to upload a zipfile to R2. My worker receives the zip file as formdata: const formData = await req.formData(); then I get the file inside formData: const file = formData.get('file'); and put it in R2 await env.MODELS_BUCKET.put(file); also, I've tried await env.MODELS_BUCKET.put(file.stream()); but it gives the following error:
{
"name": "TypeError",
"message": "Failed to execute 'put' on 'R2Bucket': parameter 2 is not of type 'ReadableStream or ArrayBuffer or ArrayBufferView or string or Blob'.",
"stack": "TypeError: Failed to execute 'put' on 'R2Bucket': parameter 2 is not of type 'ReadableStream or ArrayBuffer or ArrayBufferView or string or Blob'.\n at main.js:79:44\n at async Object.handle [as fetch] (main.js:57:30)\n at async jsonError (main.js:98:12)"
}
{
"name": "TypeError",
"message": "Failed to execute 'put' on 'R2Bucket': parameter 2 is not of type 'ReadableStream or ArrayBuffer or ArrayBufferView or string or Blob'.",
"stack": "TypeError: Failed to execute 'put' on 'R2Bucket': parameter 2 is not of type 'ReadableStream or ArrayBuffer or ArrayBufferView or string or Blob'.\n at main.js:79:44\n at async Object.handle [as fetch] (main.js:57:30)\n at async jsonError (main.js:98:12)"
}
Can anyone help me with this? What am I doing wrong?
6 replies