none
OneDrive File Picker JavaScript SDK v7.0 RRS feed

  • Question

  • We can't download  <g class="gr_ gr_20 gr-alert gr_gramm gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="20" id="20">file</g> to OneDrive  account, we use OneDrive File Picker JavaScript SDK v7.0 like described in the doc  (An <g class="gr_ gr_15 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="15" id="15">http</g>, https, or data URI for the file to be uploaded. OneDrive for Business and SharePoint only supports data URI values.). We create a request with date <g class="gr_ gr_16 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="16" id="16">uri</g> for pdf: data:application/pdf;base64,..... and next going the content of the file in base64. When we try to download normal files, we get the issue: "<g class="gr_ gr_17 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="17" id="17">Request URI</g> Too Large <g class="gr_ gr_34 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="34" id="34">onedrive</g>", when we download small files we can save them, but the files are empty or we can't open it.




    • Edited by Leg1r Monday, July 11, 2016 10:38 AM grammarly tags were added
    Monday, July 11, 2016 10:12 AM

All replies

  • Please read the document below about how to open files with the OneDrive file picker SDK for JavaScript :

    https://dev.onedrive.com/sdk/js-v6/js-picker-open.htm

    And how do you download the file content ? If you have the download link of the file ,you could save the file with code :

     window.location.href = "https://o365e3w15-my.sharepoint.com/personal/dennis_o365e3w15_onmicrosoft_com/_layouts/15/download.aspx?guestaccesstoken=A8W5pvItE%2fstKJc9G5Gc7nKUYkMWy3wZCot9vCetTF0%3d&docid=0e787f7da66c740cb8df343ef6722f713&expiration=2016-07-12T09%3a12%3a25.000Z&userid=3&authurl=True&NeverAuth=True";

    You could also refer to below demo about how to save/open/download files with OneDrive File Picker javascript sdk :

    https://github.com/rgregg/onedrive-filepicker-javascript 



    Tuesday, July 12, 2016 6:34 AM
    Moderator