-
Notifications
You must be signed in to change notification settings - Fork 19
- updates large file upload task spec java examples #42
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
|
related work microsoftgraph/msgraph-sdk-javascript#392 |
andrueastman
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.
With regards to the first query. I agree we should try to align the object modelling where we can.
|
@andrueastman @nikithauc What about aligning on LargeFileUploadXXX (Provider, result, etc...) ? |
|
With regards to namespace naming, I think it best lives in the same place as the PageIterator which is also a Task. |
|
which we don't have in Java. So the guidance would be a |
|
I just pushed another commit making the changes we've been talking about. Let me know what you think. |
|
|
||
| // create an upload session | ||
| const uploadTask = await MicrosoftGraph.OneDriveLargeFileUploadTask.create(client, file, options); | ||
| const uploadTask = await MicrosoftGraph.LargeFileUploadTask.create(client, file, options); |
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.
There is no create() function in LargeFileUpload task. It is only in OneDriveFileUpload. Please undo this for the time being. I will update this.
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 goal of this document is to describe the future state of the solution, not the current one. I'd like this spec to be as final as possible so we each have clear guidelines on what changes need to be implemented in each SDK. The Java samples also do not map to current state here, this is expected.
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.
LargeFileUploadTask.createUploadSession(client: Client, requestUrl, payload, headers) this is what is present.
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.
which is the equivalent of graphClient.me().drive().item("blah.blob").createUploadSession() and is present as a static method because the JS SDK doesn't have a fluent API yet, correct?
What's the method to create an upload task from the session? a ctor like new LargeFileUploadTask(session, stream, options) ? And then task.upload()?
|
I came across this issue in JavaScript microsoftgraph/msgraph-sdk-serviceissues#39. |
|
Yeah. The deserializer in C# is set to be case insensitive on properties. |
andrueastman
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.
This looks good to me now once we incorporate the comments from @nikithauc
Co-authored-by: Nikitha Chettiar <[email protected]>
|
@nikithauc Oh yeah! I remember running into the same issue when working on the Java one. I'm going to add a warning in the document to tell implementers to plan for that. Thanks for the reminder. |
Co-authored-by: Nikitha Chettiar <[email protected]>
|
Thanks for the discussion! Merging. @nikithauc I haven't created issues in the JS repo to align on the spec because I know you already have multiple issues tracking work on that front. Let me know if I should create one like I did for java and dotnet. |
Thank you @baywet! The discussion on upload handling came up because of bugs reported in the JS repo. So we already have issues open for upload updates. |
This pull request cleans up some of the language in the requirement, markdown formatting and updates the java samples.
Items left to discuss:
We can have the discussion here before we merge that pull request. This way I can make subsequent updates before we merge this PR.