The Computer Oracle

Is there a way of uploading to box.com storage via the command line?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Popsicle Puzzles

--

Chapters
00:00 Is There A Way Of Uploading To Box.Com Storage Via The Command Line?
00:25 Accepted Answer Score 7
01:09 Answer 2 Score 9
01:40 Answer 3 Score 1
02:03 Answer 4 Score 1
02:13 Thank you

--

Full question
https://superuser.com/questions/757792/i...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#commandline #upload #boxcom

#avk47



ANSWER 1

Score 9


Sorry, I cannot comment (needs 50 Reputation). As Julian mentioned, you can use WebDAV. This is also enabled for non business accounts; use the URL https://dav.box.com/dav. The folder can not seem to be mounted in windows: http://www.onemetric.com.au/Documentation/Mounting-A-WebDAV-Share-Windows-7 I think this is a Web Server problem. But you can use curl:

curl -u me@email.com:mypassword -T local_file_path  https://dav.box.com/dav/remote_file_name
curl -u me@email.com:mypassword  https://dav.box.com/dav/remote_file_name --output download_file_path



ACCEPTED ANSWER

Score 7


Box supports WebDAV, FTP (only for business and enterprise customers) and has an API.

So you could either use a tool to mount the WebDAV entry as a drive, use FTP from the command line or install something like cURL and use the API from the command line. Note that the main support for the API is listed as being via StackOverflow!

Obviously, if you have Box sync installed, you can simply copy files into the sync folder as well.

In Windows \\dav.box.com@SSL\DavWWWRoot\dav is the URN to connect.

If you express a preference in the comments, I'll try to add more detail but I have to run now.




ANSWER 3

Score 1


I wrote PrintToBox to solve this need for enterprises using Linux/Unix. It uses Box's Java SDK so you must have JDK 7 or JDK 8 installed. I intend to port it to Windows and to Box Platform (to take advantage of App Auth/App Users) but it's not there yet (help wanted, heh).




ANSWER 4

Score 1


If you have worked with R language, there is a nice package at https://github.com/brendan-r/boxr for interacting with box via commandline.