-
Notifications
You must be signed in to change notification settings - Fork 233
Allow custom upload session url in OneDriveLargeFileUpload.create
#1010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the optional
…com/microsoftgraph/msgraph-sdk-javascript into nikithauc/#917-uploadsession-custom
Updated. Please verify :) |
gavinbarron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
fixes #917.
OneDriveLargeFileUpload.create()defaults to creating an upload session forme/drive/root. Adding an option to pass any customuploadSessionURLdifferent than the default one.