Skip to main content

Add Ui Element copy, move File

  • October 27, 2023
  • 5 replies
  • 276 views
Add Ui Element copy, move File

Hi everybody.

I am integrating the box into my website. The integration has been completed. I searched the documentation to add the function to copy or move files to another folder but there was none. Do I have any solution for this problem?

Thank you very much!

I need copy or move function like app.box.com

5 replies

CodeBoxSeb
  • Box Employee
  • October 27, 2023

Hi @doremun 🙂

To copy a file, you can read the documentation here: https://developer.box.com/reference/post-files-id-copy/

If you need to copy the file to a new directory, then you have to use the parent parameter. The parent will be the folder ID of the destination folder.

If you need to move the file, then you need to use the PUT method :

It will allow you to move the file, rename it, lock it or create a shared link.

I hope it helps !


  • Author
  • New Participant
  • October 27, 2023

Thanks for your solution,
I have a small question, with API of your solution, how do I integrate buttons into Content Explorer’s existing ui. because in this document there are Parameters(canPreview, canDownload, canDelete,…) https://developer.box.com/guides/embed/ui-elements/explorer/
It will look like this image (I draw Move or copy)


CodeBoxSeb
  • Box Employee
  • October 27, 2023

I think the options Move and Copy are not available in the Content UI.
You can only achieve this using API calls.


  • Author
  • New Participant
  • October 27, 2023

Thank you so much, ☺️


  • Author
  • New Participant
  • October 27, 2023

Ah. I read a question in box-ui-element’s GitHub. I’m wondering when it will be available ? Support Move/Copy in Content Explorer · Issue #141 · box/box-ui-elements · GitHub