سؤال

I am working on integrating my application with Box. I am providing a way for a user to send files to the server, and the server will upload to a managed enterprise Box account.

I would like to support users who already have a file in Box so that they can select a file from their Box account and transfer it to the server's Box account. I can do this by having the user download the file, upload it to the server, and having the server upload it to its Box account.

It seems silly to download and re-upload the file. Is there a way to simply copy the file from the user account to the server's account (with the user's approval)?

هل كانت مفيدة؟

المحلول

So let's say you have user A and user B. If you want to copy a file from user A's "outbox" folder to user B's "inbox" folder. You can do it one of two ways.

Either user B can make user A a collaborator with Editor access to the "inbox" folder. Then from user A's account they can do the copy API (POST /files//copy documentation here) and "push" the file into B's inbox.

Or

Via a "pull" model. User A can give user B access to their "outbox" folder, and user B can run the copy API, and copy the content to their "inbox" folder.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top