npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pd-spuploadfiles

v1.0.0

Published

<a name="module_pdspuploadfiles"></a>

Downloads

4

Readme

pdspuploadfiles

pd-spuploadfiles is a module to upload files into sharepoint.

The only files it will accept are from the file input of the dom (filelist). This module will upload as many files as you pass it. The max file size support at this time is 2gb. If a user passes a file that is larger than 2gb the process promise will be rejected and the catch block will receive a object with a filesToBig property. The filesToBig property will contain an array of all file names that were to big. You are responsible for displaying the files to big message to the user.

This module depends on

  1. pd-spUtil
  2. pd-spserverajax
  3. axios

pdspuploadfiles.uploadFilesToLibrary(props)

Uploads files to a SharePoint Library.

Kind: static method of pdspuploadfiles

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.folder | string | folder to save file in, ex SharedDocuments/folder1 | | props.files | filelist | files in the file input element to be uploaded | | [props.itemCreatedCB] | itemPreProcessing | this call back is called when an item is added to be processed | | [props.itemUploadProgressCB] | itemProgressProcessing | this call back is called when the progress event is fired | | [props.itemCompletedCB] | itemCompletedProcessing | this call back is called when item is completed |

pdspuploadfiles.uploadFilesToList(props)

Uploads files to a list item. Will accept multiple items

Kind: static method of pdspuploadfiles

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.itemIds | Array.<number> | array of item ids to upload files to | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | props.files | filelist | files in the file input element to be uploaded | | [props.itemCreatedCB] | itemPreProcessing | this call back is called when an item is added to be processed | | [props.itemUploadProgressCB] | itemProgressProcessing | this call back is called when the progress event is fired | | [props.itemCompletedCB] | itemCompletedProcessing | this call back is called when item is completed |

pdspuploadfiles~itemPreProcessing : function

The index and itemData to process will be passed to this function the order number is your id to locate elements (dom or whatever) based on the specific item processing for creating a front end this is where to create the dom element to update with progress data

Kind: inner typedef of pdspuploadfiles

| Param | Type | | --- | --- | | itemData | any | | index | number |

pdspuploadfiles~itemProgressProcessing : function

The itemProgressProcessing will be passed the progress number and the index to trigger any side effects Index is your id to locate elements (dom or whatever) based on the specific item processing There is a small gap in time once the 100% is recieved and when the server sends the completed event (fyi)

Kind: inner typedef of pdspuploadfiles

| Param | Type | | --- | --- | | percentUploaded | number | | index | number |

pdspuploadfiles~itemCompletedProcessing : function

The processingCompletedCallback will be passed the order number and the process status (success or fail) to trigger any completed side effects The order number is your id to locate elements (dom or whatever) based on the specific item processing This is where you would pass the actions to show item completed uploading

Kind: inner typedef of pdspuploadfiles

| Param | Type | | --- | --- | | status | string | | index | number |