pnp/PnP

Provide file Update for Chunked Methode

ncmadhan1989 opened this issue · 2 comments

Unable to update file metadata using Chunked Method

web.getFolderByServerRelativeUrl("/sites/dev/Shared%20Documents/test/").files.addChunked(file.name, file, data => {

            Logger.log({ data: data, level: LogLevel.Verbose, message: "progress" });

        }, true).then(_ => Logger.write("done!"));

i.e.
f.file.getItem().then(item => {

    item.update({
        Title: "A Title",
        OtherField: "My Other Value"
    });
});

kindly provide the sample

I think you meant to post this over in the PnPJs Repository https://github.com/pnp/pnpjs/issues

In any case, I have no problem with the addChunked method and subsequently updating the related item values.

 web.getFolderByServerRelativeUrl("/sites/Test/Shared%20Documents/").files.addChunked(file.name, file).then(f => {
      f.file.getItem().then(item => {
          item.update({
              Title: "A Title"
          }).then(i=>{
            alert('success');
          });
      });

Works perfectly fine for me.

Ok thankz