Skip to content
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

Uploading files larger than 4 MB #111

Closed
DavidCannon opened this issue Sep 11, 2018 · 17 comments
Closed

Uploading files larger than 4 MB #111

DavidCannon opened this issue Sep 11, 2018 · 17 comments
Labels

Comments

@DavidCannon
Copy link

Hi @muthurathinam, I was wondering if you could provide a sample of how to upload a file that is larger than 4 MB using a browser?

@muthurathinam
Copy link
Contributor

@DavidCannon To upload a file to OneDrive..?

@DavidCannon
Copy link
Author

Yes. I'm actually uploading to SharePoint, but SharePoint and OneDrive for Business are pretty much the same. So what works for OneDrive should be fine. Thank you!

@muthurathinam
Copy link
Contributor

muthurathinam commented Sep 11, 2018

@DavidCannon
Support for Large File uploading to OneDrive is implemented and will be available in our next release.

Thank you for your patience till our next release. We really appreciate it!
883190

@muthurathinam
Copy link
Contributor

@DavidCannon
Copy link
Author

Thank you for this, but I'm afraid OneDrive for Business and SharePoint do not work, even though they are supported in the Graph API. The reason is because you have the "me" drive hard-coded, rather than allowing us to provide the drive ID. Here's an example of where it is hard-coded:

return encodeURI(/me/drive/root:${path}${fileName}:/createUploadSession);

Found here: https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/1.3.0/src/tasks/OneDriveLargeFileUploadTask.ts#L100

Instead, we should be allowed to provide an options driveId, which then make the endpoint like this:

/drives/${driveId}/root:${path}${fileName}:/createUploadSession

And the endpoint to retrieve items from the root folder of a SharePoint drive would look something like this:

/drives/${driveId}/root/children

It would be great if this SDK supported SharePoint (and OneDrive for Business). Thanks for all your hard work! 👍

@muthurathinam
Copy link
Contributor

@DavidCannon Thanks for notifying, Will work on this.

@muthurathinam muthurathinam reopened this Sep 24, 2018
@jplevene
Copy link

jplevene commented Oct 10, 2018

We are hitting the 4mb limit with emails as well. Our client's are obviously not liking it with some already abandoning 365.

@muthurathinam
Copy link
Contributor

@jplevene yes we have 4MB limitation for emails. Also we have plan to support emails larger than 4MB and I cannot give you the ETA as of now, this is going to take some time.

@songpr
Copy link

songpr commented Nov 27, 2018

@muthurathinam could you please allow us to pass option "@microsoft.graph.conflictBehavior": "replace" as well, since I want to replace it rather than rename

@muthurathinam
Copy link
Contributor

@songpr Thank you for the ask. Will look into this.

@Pjata
Copy link

Pjata commented Apr 4, 2019

Any update on this issue? We would like to use OneDrive as our document storage and this would greatly affect our decision.

@muthurathinam
Copy link
Contributor

@Pjata Will fix this in next release which is scheduled to be released before end of April.

@muthurathinam
Copy link
Contributor

muthurathinam commented May 11, 2019

@DavidCannon @jplevene @songpr @Pjata Your ask is done in this preview release. Please try and let me know your feedback. Refer this guide.

@jplevene
Copy link

jplevene commented May 13, 2019

@DavidCannon @jplevene @songpr @Pjata Your ask is done in this preview release. Please try and let me know your feedback. Refer this guide.

Slight "error" I'm affraid. On the version site it says to load the script use:

<script src="https://secure.aadcdn.microsoftonline-p.com/lib/VERSION/js/msal.min.js"></script>

Changing VERSION to anything above 0.2.4 doesn't work. This is under "Creating an instance of MSALAuthenticationProvider in browser environment"

@muthurathinam
Copy link
Contributor

muthurathinam commented May 13, 2019

@jplevene The package depends on the particular version of msal. you can refer msal version number under devDependencies in package.json. Is your application depends on some other version of msal ?

@muthurathinam
Copy link
Contributor

Fixed in 1.7.0 release.

@DharmendraNaberly
Copy link

How to upload 5 files of 1MB each, as attachment in Outlook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants