Skip to content
Discussion options

You must be logged in to vote

Just a heads up, I was able to get this to work for the node environment. You can create a Readable from async iterables by calling Readable.from(data). Here is my code (I'm using S3 api w/ backblaze):

import { Readable } from 'stream'
import type { UploadHandler } from '@remix-run/node'
import { S3Client } from '@aws-sdk/client-s3'
import { Upload } from '@aws-sdk/lib-storage'

const {
  S3_BUCKET,
  S3_REGION,
  S3_ENDPOINT,
  S3_ACCESS_KEY_ID,
  S3_SECRET_ACCESS_KEY,
} = process.env

if (!S3_BUCKET) {
  throw new Error(`Storage is missing required configuration.`)
}

if (!S3_REGION) {
  throw new Error(`Storage is missing required configuration.`)
}

if (!S3_ACCESS_KEY_ID) {
  throw new 

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@spencerjsmall
Comment options

@AlessandroVol23
Comment options

Answer selected by n1ghtmare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants