# REST Operation: Is it possible to have a binary file as the body of a request?

**URL:** <https://forum.novacura.com/t/rest-operation-is-it-possible-to-have-a-binary-file-as-the-body-of-a-request/711>\
**Category:** Flow Classic\
**Created:** [June 26, 2024, 8:38pm UTC](https://forum.novacura.com/t/rest-operation-is-it-possible-to-have-a-binary-file-as-the-body-of-a-request/711 "2024-06-26T20:38:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew](https://avatars.discourse-cdn.com/v4/letter/a/7C9FD7/32.png) [@Andrew](https://forum.novacura.com/u/Andrew)\
**Post date:** [June 26, 2024, 8:38pm UTC](https://forum.novacura.com/t/rest-operation-is-it-possible-to-have-a-binary-file-as-the-body-of-a-request/711/1 "2024-06-26T20:38:43Z")

</div>

Hi,  
I am working on a flow to have a user upload an excel file, then have this excel file uploaded to onedrive. In my flow, I am currently able to generate the upload URL but am stuck at the next step of uploading the file. In my operation, I have it set up to take in the upload URL for the path and take in the file size to fill in the content-range header. The PUT request however also requires the file itself to be placed in the body of the request usually as binary.

I am wondering how I can take the file uploaded and then have it placed into the body of my request to upload to onedrive. Any help or knowledge of how to do this would be greatly appreciated.

Best,  
Andrew

---

<div class="post-metadata">

**Author:** ![OlaCarlander](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/olacarlander/32/205_2.png) [@OlaCarlander](https://forum.novacura.com/u/OlaCarlander)\
**Post date:** [June 28, 2024, 9:46am UTC](https://forum.novacura.com/t/rest-operation-is-it-possible-to-have-a-binary-file-as-the-body-of-a-request/711/2 "2024-06-28T09:46:57Z")

</div>

Hi,

Try to set the data type to string with the type format bcl:byte []

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/ddb419ec593d06d9889d7b04f76f5f85add5f7ac.png)

I think that will filestream it to you onedrive

---

<div class="post-metadata">

**Author:** ![OlaCarlander](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/olacarlander/32/205_2.png) [@OlaCarlander](https://forum.novacura.com/u/OlaCarlander)\
**Post date:** [June 28, 2024, 9:56am UTC](https://forum.novacura.com/t/rest-operation-is-it-possible-to-have-a-binary-file-as-the-body-of-a-request/711/3 "2024-06-28T09:56:51Z")

</div>

Or since this is an input parameter (upload), you can try the Stream type:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/f8718f77e7ec908ac81f447355957337116f115e.png)
