locked
Cannot upload large files to SharePoint using HTML5 file API RRS feed

  • Question

  • Hi, I am struggling to upload large files using the JavaScript HTML 5 file API to SharePoint. I have read that I may have to split the file into chunks to upload. I have found documentation on the MSDN library of three methods...

    SP.File.startUpload(GUID, stream1)            
    SP.File.continueUpload(GUID, 10 MB, stream2)        
    SP.File.finishUpload(GUID, 30 MB, stream3)

    - which details a chunked file API.  However as yet I am unsure of how to use it.  For example do I use a generated GUID by calling var guid = SP.Guid.newGuid();? Is the stream just at chunk of the byte data in a Uint8Array? Is this a static method or should it be called on the file being created? Do successive uploads have to be called asynchronously when done? Do I still use SP.FileCreationInformation to create the file in the first place and then operate on this new file?  Has anyone has any idea of how to use this API (sample code would be much appreciated!)?

    Tuesday, September 27, 2016 10:02 AM

All replies

  • Hi Ashley,

    Please check the demo below to use upload chunk files:

    Using chunked upload/StartUpload with sharepoint REST api

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, September 28, 2016 9:20 AM
  • Hi,

    Thanks for that but at this point in time I am using a JavaScript only based solution.  I have actually been able to get a REST solution working in the meantime however which does seem to handle large files without chunking.  Thanks for your help anyway.

    Wednesday, September 28, 2016 9:45 AM