Skip to content

Conversation

@nikithauc
Copy link
Contributor

fixes #917.

OneDriveLargeFileUpload.create() defaults to creating an upload session for me/drive/root. Adding an option to pass any custom uploadSessionURL different than the default one.

@nikithauc nikithauc requested a review from gavinbarron October 17, 2022 18:22
@nikithauc nikithauc enabled auto-merge (squash) October 17, 2022 18:28
@gavinbarron
Copy link
Member

throw new GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");
}
const requestUrl = OneDriveLargeFileUploadTask.constructCreateSessionUrl(options.fileName, options.path);
const requestUrl = options?.uploadSessionURL ? options.uploadSessionURL: OneDriveLargeFileUploadTask.constructCreateSessionUrl(options.fileName, options.path);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the optional chaining of options here is not needed as line 166 validates that options has a value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the optional

@nikithauc
Copy link
Contributor Author

Copy link
Member

@gavinbarron gavinbarron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nikithauc nikithauc merged commit 821d8c2 into dev Oct 19, 2022
@baywet baywet deleted the nikithauc/#917-uploadsession-custom branch November 30, 2022 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uploading files using OneDriveLargeFileUploadTask with only the Files.ReadWrite.AppFolder permission is not possible

3 participants