6
Views
4
Comments
[Azure Blob Storage] I need to pass content-type in the upload blob how?
azure-blob-storage
Web icon
Forge asset by Barduino
Application Type
Traditional Web

I need to pass content-type in the upload blob how?

2026-03-03 06-24-34
Grijesh Suman

Hi @Mariam Hesham

 The Azure Blob Storage Forge component may not provide a direct parameter to specify the Content-Type during blob upload. In OutSystems 11 Traditional Web applications, there are a few approaches you can consider: If the upload action is implemented through a REST method, add a Content-Type HTTP header and populate it with the appropriate MIME type (for example, image/jpeg, image/png, or application/pdf). If the component exposes blob properties, set the x-ms-blob-content-type value before uploading the file. 

If the Forge component does not support this capability, consider creating a custom REST integration with the Azure Blob Storage API, where the required headers can be specified explicitly.

 Example headers: Content-Type: image/jpeg
                                   x-ms-blob-type: BlockBlob 

 Without setting the Content-Type, Azure Blob Storage may store the file as application/octet-stream, which can result in browsers downloading the file instead of displaying it inline. If you can share the specific action you are using from the Azure Blob Storage Forge asset (for example, UploadBlob, PutBlob, or a custom implementation), it may be possible to provide more targeted guidance.

UserImage.jpg
Mariam Hesham

I'm using UploadBlob 

2026-03-03 06-24-34
Grijesh Suman


If you're using the UploadBlob action from the Azure Blob Storage Forge component, I don't believe the action exposes a parameter to directly set the Content-Type header during the upload. As a result, the uploaded file may be stored with the default content type (application/octet-stream). If you need the blob to have a specific MIME type (for example, image/jpeg, image/png, or application/pdf), you may need to:

- Extend or modify the component's underlying REST implementation to include the Content-Type or x-ms-blob-content-type header.

- Alternatively, create a custom REST API call to Azure Blob Storage where the required headers can be passed explicitly.

 While both approaches are feasible, I would recommend implementing a custom REST API integration rather than modifying the Forge component, as it is easier to maintain and avoids the risk of losing customizations during future Forge asset upgrades. 

2020-11-25 10-45-32
Mostafa Othman
Champion

Hi Mariam,
Please check this old post about same topic. This Forge component doesn't support content type and send it as application/octet-stream 
https://www.outsystems.com/forums/discussion/59142/azure-blob-storage-set-content-type-on-azure-blob-storage/
You can check this component which using Azure Blob storage Rest APIs:
https://www.outsystems.com/forge/component-overview/13998/azure-blob-storage-api-o11
And you can review this documentation:
https://learn.microsoft.com/en-us/rest/api/storageservices/put-blob?tabs=microsoft-entra-id

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.