Skip to content

no way to set content disposition on s3file.write #25362

@paperclover

Description

@paperclover

What is the problem this feature would solve?

cannot use bun s3 client because it cannot set content-disposition (other headers including content encoding too)

What is the feature you are proposing to solve the problem?

      const file = s3Client.file(key, { bucket });
      await file.write(buffer, {
        type: contentType,
        disposition: contentDisposition
        // or headers: { 'Content-Disposition': contentDisposition }
      });

What alternatives have you considered?

aws sdk uses this:

      const command = new PutObjectCommand({
        Bucket: bucket,
        Key: key,
        Body: buffer,
        ContentType: contentType,
        ContentDisposition: contentDisposition,
      });
      await s3Client.send(command);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions