Welcome to the new Box Support website. Check out all the details here on what’s changed.

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.