Forum Discussion

Aniket_Sannake1345's avatar
Aniket_Sannake1345
Copper Contributor
Sep 15, 2022
Solved

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 :

  1. Create the document Library 
  2. Api response 
  3. Webpart Structure
  4. Upload buttons
  5. function write in the code 
  6. 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

Resources