Possible to upload files to a Box 'file request' URL via linux CLI?

Highlighted
Contributor

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.

 

Thanks

Tags (2)
5 REPLIES 5
Highlighted
Box Employee

Re: Possible to upload files to a Box 'file request' URL via linux CLI?

Hi @colohost ,

 

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.

 

Thanks,

Jon

Highlighted
Contributor

Re: Possible to upload files to a Box 'file request' URL via linux CLI?

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.

Highlighted
Box Employee

Re: Possible to upload files to a Box 'file request' URL via linux CLI?

@colohost Unfortunately we don't have an API endpoint to interact with the file request feature at this time. I highly recommend submitting this feedback to pulse.box.com if you'd like to see this added! 

 

Best, 

Kourtney

Box Technical Support Engineer 

Highlighted
Contributor

Re: Possible to upload files to a Box 'file request' URL via linux CLI?

Oh, not even looking for something that formal.  I'm just wondering if there's any type of command line web request executable, such as curl or wget, that is capable of properly interacting with the Box "File Request" feature's javascript to allow for the uploading of a file to the file request URL without the need to use a 'real' browser like Firefox, etc.  The issue I ran into is the URL the 'file request' produces is not just able to receive a POST request from curl and receive the file using the typical -F multipart POST request that curl would normally use to send files to a remote URL.

Highlighted
New Contributor

Re: Possible to upload files to a Box 'file request' URL via linux CLI?

Hello, I need this functionality too...

 

Is there a way to upload a file using bash scripts (cURL) to a Box File Request page?