Open meidlinga opened 1 year ago
A similar question also appeared for S3 in https://github.com/tus/tusd/issues/978. I think it would be worth adding this to storages, which provide some mechanism for saving the file name and file type in a dedicated manner. Does Azure have such a functionality?
Yes, Azure supports it by adding a specific header in the upload request. It is x-ms-blob-content-type
, documented here: https://learn.microsoft.com/en-us/rest/api/storageservices/put-blob?tabs=azure-ad#request-headers-all-blob-types
That's good to know. It is also very similar to the Content-Type
header that is used for AWS S3 to set the file type for an object: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html#API_CreateMultipartUpload_RequestSyntax
It should not be too hard to set those two values when creating an upload. tusd currently inspects the filetype
meta data entry and sets Content-Disposition
accordingly when a user downloads a file via tusd. We can also read this value and pass it to Azure, S3 etc.
It would be great if tusd could set Content-Type, Content-Encoding, and Content-Disposition for storages that support it.
Question I would like to include the uploaded files mime type in the upload meta data. Then I would like to store this information along the uploaded file on Azure storage. On a quick glance over the code, I could not find this feature. Would this currently be possible in any way?
Setup details Please provide following details, if applicable to your situation: