Possible to upload files to a Box 'file request' URL via linux CLI?
Hi all, curious if anyone knows of a way to upload files to a Box "File Request" URL via command line, perhaps with curl? For clarification, I'm not trying to do an API-based upload, I'm wanting to send a file directly from a linux box to the Box folder of a third party who has gone in, clicked "File Request", and then received a URL from Box that they send to anyone who needs to send an inbound-only file to that person. Would prefer to not bring the file down to my desktop just to then send it back via a graphical web browser.
If I understand your request (and please correct me if I'm wrong) you'll looking for a public URL structure for a file stored in Box that can be processed as a download URL for another service?
I know you said that you weren't looking for an API solution, but there is a lightweight way of doing this without a deep app integration. I've outlined the process for creating a public URL in this previous post, which I think may help get you there.
No, I'll give an example. If I want you to send me a file, without adding you as a collaborator to a folder, I log into Box via web browser, go to the folder where I want your file to end up, click "File Request". Box will spit out a URL that I can then send you, you plug it into your browser, and you get a website that says hey drop your files here. If you drop a file, it ends up in my folder, you have no additional access.
What I'm trying to accomplish is to take that same file request URL that works fine in a regular web browser, and use it via curl or similar command line tool to upload a file via linux command line. We have customers who would like to send us data directly from a linux system, and they don't want to take the additional step of download file to a desktop computer, then upload back to Box via the File Request URL we send them.
I don't know about bash or linux, but here's how I do it on Powershell on Windows: https://stackoverflow.com/a/64008466/1411058
It seems like some people have had success using curl to upload files to box:
But I can't get this to work using a file request URL. @colohost, if you ever solved this problem please let us know!
Please sign in to leave a comment.