Skip to content

S3 Compatibility: Content-Disposition for GetObject() not working #544

@francis2tm

Description

@francis2tm

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I'm a bit confused if this is a missing feature or a bug, as your docs don't specify if you support Content-Disposition for GetObject(), using AWS'S official rust S3 SDK.

To Reproduce

let presigned_request = state
        .s3_client
        .get_object()
        .bucket("file")
        .key(&file.s3_key)
        .response_content_disposition("attachment; filename=\"hello.txt\"")
        .presigned(PresigningConfig::expires_in(Duration::from_secs(3600)).unwrap())
        .await?;

println!("presigned_request: {:?}", presigned_request.uri());

Produces a valid presigned download URL but the downloaded filename is not the one provided in the content disposition header.

Expected behavior

Downloaded filename is the one provided in the content disposition header.

System information

  • OS: Ubuntu 22.04
  • Supabase CLI: 1.191.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions