-
Notifications
You must be signed in to change notification settings - Fork 231
LargeFileUploadTask is ending with PassThrough stream instead of saying JSON response with id #359
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
Comments
@hilarudeens Thank you for reporting this issue! I will take a look at this issue. |
@hilarudeens Thank you @ificator for your help with this issue! |
TODO - The current LargeFileUpload task implementation in JS sdk needs an update. We should be allowing uploads to Outlook and the design should not be tightly coupled with the response format of one service like the current implementation . |
@nikithauc Thanks for responding. I'm expecting a way to get id. I'm okay to read Location header, however the current SDK implementation is giving passThrough stream. I'm unable to read Location header from passThrough. Do I need to wait for SDK upgrade? or is there any workaround? |
@hilarudeens There will be an design change for this issue. A suggested workaround would be following this https://docs.microsoft.com/en-us/graph/outlook-large-attachments?tabs=javascript documention. I apologize for the inconvenience. Please let me know if you have any questions. |
this issue of the sdk returning a passThrough stream can also be reproduced by making a call to the copy endpoint as specified here (specified in the 'initial action request' section). |
@clawyq Thanks for bringing this to our attention! This issue will be addressed in 3.0.0. |
@clawyq Can you please check if the following works for you -
using |
@nikithauc I was able to retrieve the monitor URL through the steps detailed here. It would be very helpful if there was documentation for this flow with the API. Also, does the graph client support querying for the progress of the operation? Currently, after obtaining the monitor URL, I will then use axios to get the status of the operation - was wondering if the SDK itself natively provides the ability to query for the status of the operation. Thanks! |
@clawyq can you try the following ?
|
Bug Report
I'm using msgraph-sdk-javascript in NodeJs and try attach a document in Outlook email. The issue is, LargeFileUploadTask.uploadSlice function returns PassThrough readable stream on end of file upload instead of JSON response with id.
Prerequisites
I'm using 2.1.1 as of 19th Nov 2020
Steps to Reproduce
Create an Outlook draft message by usingPostman.
Create a simple HttpTrigger Azure Function and Add following code in Azure Function handler.
Execute AzureFunction in Visual Studio Code.
Call HttpTrigger from Postman
Expected behavior:
Large file should be uploaded in sequential PUT call. In end of all chunks upload,
LargeFileUploadTask.uploadSlice
function should give response with 'id'Actual behavior:
LargeFileUploadTask.uploadSlice
function is giving NodeJs ReadableStream.Additional Context
Code Line:
msgraph-sdk-javascript/src/tasks/LargeFileUploadTask.ts
Line 254 in 4130614
AB#7549
The text was updated successfully, but these errors were encountered: