1.0.20 • Published 3 years ago

file-upload-spfx-library v1.0.20

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

file-upload-spfx-library

Made with Fluent UI control

NPM JavaScript Style Guide

Install

npm install --save file-upload-spfx-library

Usage

import AttachmentControl,{saveFilesToLibrary,savingFiles,deleteFiles} from 'file-upload-spfx-library';


//To render the upload control
class Example extends Component {
  render() {
    return <AttachmentControl context={this.props.context} existingFiles={this.state.ExistingFile} viewOnlyMode={this.state.IsEditMode} onChange={(file)=>this.onFileChange(file)} onDelete={(file)=>this.onDelete(file)}></AttachmentControl>
  }
}

//to save the file to library/list use helper 
saveFilesToLibraryList(files:any,listName:string,context:any,itemID:number,IsFileAsAttachment:boolean,destinationPath:string).then(()=>{

})


//to store selected file use function like this
private onFileChange = (file)=>{
  this.setState({
    Files:file
  })
}

//to store selected file use function like this
private onDeleteFile = (file)=>{
  this.setState({
    FilesToBeDelete:file
  })
}

License

MIT ©

git remote add origin https://github.com/kmrshubham0/file-upload-spfx-library.git # Sets the new remote for the local repo git add . git commit -m 'Initial Commit' git push -u origin main # Pushes the changes to the remote repository

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago