Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Add metadata to the file uploaded via context upload UIelement

New post

Comments

1 comment

  • Peter Christensen

    Hi Chiths

    There is nothing natively in the content uploader element that allows you to do this but there is a way of using the event listeners to achieve what you need. There is a complete listener that will fire when all uploads are complete, you can then iterate over the files and apply metadata to each one

    Something like this:

    contentUploader.addListener('complete', function(files) {
      files.forEach(function(f) {
       //f.id gives the ID of the uploaded file and you can use our API to apply metadata to the file
      // https://developer.box.com/reference/post-files-id-metadata-id-id/ for reference
      }
    });

    Best regards, Peter Christensen, Platform Solutions Engineer, Box

    0
    Comment actions Permalink

Please sign in to leave a comment.