Skip to main content
Question

PUT request to upload xlsx to Azure Blob Storage

  • January 10, 2023
  • 7 replies
  • 576 views

Forum|alt.badge.img+2

I am trying to upload an xlsx file to Azure Blob Storage using the REST Web Services action. I have tried setting the Content type to Custom with application/vnd.openxmlformats-officedocument.spreadsheetml.sheet as the type and then adding in the filepath in the parameters/substitution sections but that doesn’t upload the file correctly.

I have also tried using multipart/form-data as the content type and adding in a parameter of type File with the filepath which uploads the file but the content of the file is all scrambled and random characters.

 

How do I upload an xlsx file to Azure Blob Storage using AA?

 

Thanks

7 replies

Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+18
  • Most Valuable Pathfinder
  • January 10, 2023

Hi @Matthew 6008 ,

You will be able to upload,

Please find the below,

 

 

 


rbkadiyam
Premier Pathfinder | Tier 7
Forum|alt.badge.img+17
  • Premier Pathfinder | Tier 7
  • January 10, 2023

@Matthew 6008  install below packages 

Install-Package Microsoft.Azure.Storage.Blob -Version 11.1.1
Install-Package Microsoft.AspNetCore.StaticFiles -Version 2.2.0

Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • January 16, 2023

@Matthew 6008  install below packages 

Install-Package Microsoft.Azure.Storage.Blob -Version 11.1.1
Install-Package Microsoft.AspNetCore.StaticFiles -Version 2.2.0

Hi @rbkadiyam 

Can you guide me on where/how I can get these packages?


Forum|alt.badge.img

@Matthew 6008  install below packages 

Install-Package Microsoft.Azure.Storage.Blob -Version 11.1.1
Install-Package Microsoft.AspNetCore.StaticFiles -Version 2.2.0

Hi @rbkadiyam 

Can you guide me on where/how I can get these packages?

@Matthew 6008  install below packages 

Install-Package Microsoft.Azure.Storage.Blob -Version 11.1.1
Install-Package Microsoft.AspNetCore.StaticFiles -Version 2.2.0

Why do we need to install these pkg’s?

 

I am trying something similar but uploading a jpeg to Azure share. The Content-Length is calculated incorrectly when choosing multipart/form-data so I get an error - 

 

“<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.
RequestId:da00e011-801a-0076-15c5-ce648c000000
Time:2023-08-14T15:37:46.2817174Z</Message><HeaderName>Content-Length</HeaderName><HeaderValue>23949</HeaderValue></Error>


Forum|alt.badge.img+6
  • Navigator | Tier 3
  • April 29, 2024

Resolved!

 


  • May 6, 2024

Hi @ID55 ,

We are also facing error when uploading xlsx file, could you please explain the steps in detail.

 

Thanks,

RR


Forum|alt.badge.img
  • Cadet | Tier 2
  • August 2, 2024

Hi ID55, 

 

I am also facing the same issue, Could you please explain the steps and let me know if any packages required to add. 

 

Thanks & Regards,

Venkat