Skip to content

LargeFileUploadTask cors error #220

@gunnim

Description

@gunnim

Description

When attempting a LargeFileUploadTask it errors on client PUT with
Access to fetch at '<< longurlremoved >>' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field sdkversion is not allowed by Access-Control-Allow-Headers in preflight response.

Steps to Reproduce

  1. Follow the steps here https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/tasks/LargeFileUploadTask.md

Additional Context

If i store the session url, fileslice and headers then manually PUT using fetch not the client, that works.
So the session url does not require authorization, maybe it should not use the client?

Usage Information

I'm running 1.7.0 but the problematic code has not changed in the lated preview.

  • Node (Check, if using Node version of SDK)

Node Version - [The version of Node you are using]

  • [x ] Browser (Check, if using Browser version of SDK)

Browser Name - [The name of Browser that you are using for SDK]
Chrome
Version - [The version of the browser you are using]
76

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions