Skip to content

application/octet-stream content-type when writing to Azure Blob Storage using ObjectStoragePath #39722

Closed as not planned
@pedro-cf

Description

@pedro-cf

Apache Airflow version

2.9.1

If "Other Airflow 2 version" selected, which one?

No response

What happened?

When using ObjectStoragePath to send a file to an Azure Blob Storage Container the content type is being set as application/octet-stream

Example code:

ObjectStoragePath("file:///opt/airflow/input.tif").copy(dst=base / "copy.tif")

Content types displayed on Azure Storage Explorer:
image

(Note: input.tif is manually uploaded using Azure Storage Explorer)

Not sure if it's a bug, a feature request or if there is already a solution.

What you think should happen instead?

After uploading a file using ObjectStoragePath the content-type should be appropriate.

How to reproduce

Example code:

ObjectStoragePath("file:///opt/airflow/input.tif").copy(dst=base / "copy.tif")

Operating System

Ubuntu 22.04 (WSL2)

Versions of Apache Airflow Providers

  • apache-airflow-providers-microsoft-azure 10.1.0

Deployment

Docker-Compose

Deployment details

No response

Anything else?

Related Discussion:

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions