Share Point MetaData not created

Hi,

I am uploading a file and some metadata into Sharepoint. This is working fine most of the times.
However when there is some problem with the metadata data types I get an error that metadata can be set only for a Drive Item. However an entry is created in SP just with the file and the Metadata columns are empty. This is creating issues in SharePoint as some metadata fields are required fields.

Is there anyway to stop the file from getting uploaded in the metadata fails.

@nanmishra,

No direct way but you can following approach.

  1. Upload file with your existing code.
  2. Get File/Folder to get file uploaded in step 1 to check metadata
  3. If metadata as per requirement, do nothing else, delete the file.

Hope this workaround will work.

Thanks,
Ashok :slight_smile:

1 Like

Thanks for the suggestion.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.