Skip to content

Using application/json header for file upload (x-ms-blob-type error) #71

@jpsear

Description

@jpsear

Which service(blob, file, queue, table) does this issue concern?

File

Which version of the SDK was used?

10.1.0

What's the Node.js/Browser version?

Node: 8.9.4

What problem was encountered?

I'm not sure how to set the x-ms-blob-type header on a file upload. I can't find it documented. I am looking to upload a .graphql file. I think the content type should be application/json, but when I set this, I get the following error:

Code: 'MissingRequiredHeader',
HeaderName: 'x-ms-blob-type'

Steps to reproduce the issue?

await uploadFileToAzureFile(aborter, localFilePath, fileUrl, {
  progress: ev => console.log(ev),
  rangeSize: 4 * 1024 * 1024,
  parallelism: 20,
  fileHTTPHeaders: {
    fileContentType: 'application/json'
  }
})

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions