#outName in Backblaze creates a folder on root with same name as bucket.

1 messages · Page 1 of 1 (latest)

lucid seal
#

For some reason, when exporting my videos and sending them to backblaze using outName, it creates a folder in my root bucket ("my-bucket-name") called "my-bucket-name".

My key and endpoint don't have "my-bucket-name" in it at all. Code below. Anyone have a fix?

      const result = await renderMediaOnLambda({
        codec: LAMBDA_CONFIG.CODEC,
        functionName: LAMBDA_CONFIG.FUNCTION_NAME,
        region: REGION as AwsRegion,
        serveUrl: SITE_NAME,
        composition: body.id,
        inputProps: body.inputProps,
        framesPerLambda: LAMBDA_CONFIG.FRAMES_PER_LAMBDA,
        downloadBehavior: {
          type: "download",
          fileName: "video.mp4",
        },
        maxRetries: LAMBDA_CONFIG.MAX_RETRIES,
        everyNthFrame: 1,
        crf: compression,
        outName: {
          bucketName: "my-bucket-name",
          key: `exported/${user.id}/video-${Date.now()}.mp4`,
          s3OutputProvider: {
            endpoint: "https://my-bucket-name.s3.us-east-005.backblazeb2.com",
            accessKeyId: process.env.AWS_ACCESS_KEY_ID as string,
            secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY as string,
            forcePathStyle: true,
          },
        },
smoky forge
#

interesting!
I don't have a backblaze account to try it out, I suppose they interpret the options differently and endpoint = bucket, bucketName = folder?

try removing the bucketname from the endpoint as they also don't do this in the docs

lucid seal
#

This results in a client side error when rendered: "use-rendering.tsx:95 Render error: 'bucketName' must be a string, but is undefined"
And typescript error: "Diagnostics:

  1. Type '{ key: string; s3OutputProvider: { endpoint: string; accessKeyId: string; secretAccessKey: string; forcePathStyle: true; }; }' is not assignable to type 'OutNameInput<AwsProvider> | undefined'.
    Property 'bucketName' is missing in type '{ key: string; s3OutputProvider: { endpoint: string; accessKeyId: string; secretAccessKey: string; forcePathStyle: true; }; }' but required in type '{ bucketName: string; key: string; s3OutputProvider?: CustomCredentials<AwsProvider> | undefined; }'. [2322]"

So no go on that.

smoky forge
#

I meant, remove the bucketname from the string that you pass to endpoint

lucid seal
#

Ahh I see. Welp...that worked. You the man @smoky forge !