Forum Discussion
Aniket_Sannake1345
Sep 15, 2022Copper Contributor
How to Upload file and the metadata of the document library properties using spfx react
I have create the spfx react webpart to to upload the the files and the metatdata of the document library but when i post the columns using the sphttprequest i have facing the issue of error 500 and throw a messeage To add an item to a document library, use SPFileCollection.Add() . please help me to resolve the iisue or any other solution to upload a document and create metadata of document
library.
Image sequence :
- Create the document Library
- Api response
- Webpart Structure
- Upload buttons
- function write in the code
- console error
any other solution to perform CRUD Operation perform on document Library suggest me
created document libraryresponse of apicertificate webpartupload and submit buttonwrite the create function in spfx reactError in console
- Thanks @kalpeshvaggela i can upload file but document library properties also I want to create
You have any crud operation on document library
- kalpeshvaghelaSteel Contributor
Below is sample for File Upload using SPFx+React. You can get some idea from here.
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-file-upload
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community
- Aniket_Sannake1345Copper ContributorThanks @kalpeshvaggela i can upload file but document library properties also I want to create
You have any crud operation on document library