question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AzureFileCopy doesn't set content types

See original GitHub issue

The current AzureBlobCopy VSTS task does not set any content types based on file extension and thus are wrong (all are application/octet-stream) by default.

Many people won’t know about the /setContentType AzCopy args, so it may be a good idea to expose that directly as a checkbox on the VSTS task.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
NSTA1commented, Jan 5, 2018

Worth noting that /SetContentType sets javascript files’ content type to application/x-javascript, which is not RFC compliant.

0reactions
chidozieononiwucommented, Feb 14, 2020

In my case setting additionalArgumentsForBlobCopy actually resulted in wrong Content Type being set

additionalArgumentsForBlobCopy: |
            '/SetContentType'
            '/Y'
            '/Pattern:*'
            '/S'

What worked for me is to remove all te additional parameters, then the task was able to set correct content types for .html and .js files

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Azure Storage Blob Content Types
AzCopy two major problems: By default it does not set the Content Type of uploaded files. Everything gets set to application/octet-stream.
Read more >
AzureFileCopy@4 - Azure file copy v4 task | Microsoft Learn
Azure file copy v4 # Copy files to Azure Blob Storage or virtual machines. - task: AzureFileCopy@4 ... Destination Type. storage: # string....
Read more >
AZCopy: Set the file Content-Type - azure - Stack Overflow
If "Content-Type" is not specified at the /SetContentType option, AzCopy will set each blob's content type according to its file extension.
Read more >
Azure File Copy v4 Doesn't Copy Correctly if the Blob Prefix is ...
If yes, you could try to set role of the Storage Account: Navigate to Access control page and Add a role assignment(Storage Blob...
Read more >
How to set content type of image file when uploading to blob ...
unfortunately this doesn't seem to work. I have no idea how I can have the correct content type set for when my images...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found