1.0.20 • Published 2 years ago
file-upload-spfx-library v1.0.20
file-upload-spfx-library
Made with Fluent UI control
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
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
2 years ago
1.0.19
2 years ago
1.0.18
2 years ago
1.0.17
2 years ago
1.0.16
2 years ago
1.0.15
2 years ago
1.0.14
2 years ago
1.0.13
2 years ago
1.0.12
2 years ago
1.0.11
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago