# Content-Range Header Won't Apply In REST Connector Operation

**URL:** <https://forum.novacura.com/t/content-range-header-wont-apply-in-rest-connector-operation/714>\
**Category:** Flow Classic\
**Tags:** studio-or-server, rest-connector\
**Created:** [June 27, 2024, 7:05pm UTC](https://forum.novacura.com/t/content-range-header-wont-apply-in-rest-connector-operation/714 "2024-06-27T19:05:22Z")\
**Posts on this page:** 7\
**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 27, 2024, 7:05pm UTC](https://forum.novacura.com/t/content-range-header-wont-apply-in-rest-connector-operation/714/1 "2024-06-27T19:05:22Z")

</div>

Hello,  
I am trying to define the Content-Range header in an operation I have under my REST connector. When I set the value and check required, the header does not appear under headers and when I send my request I get the following error: {“error”:{“code”:“invalidRequest”,“message”:“The Content-Range header is missing or malformed.”}}  
I have tried creating/updating the connector first then attempting the request but that did not work either. This header is required by the request I am making, and I am wondering if I am doing something wrong to include this header although I filled in the value, checked required and tried checking override as well.

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, 10:01am UTC](https://forum.novacura.com/t/content-range-header-wont-apply-in-rest-connector-operation/714/2 "2024-06-28T10:01:55Z")

</div>

Hi, Sorry I am not sure I fully follow. Can you send some screenshots?

---

<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 28, 2024, 6:51pm UTC](https://forum.novacura.com/t/content-range-header-wont-apply-in-rest-connector-operation/714/3 "2024-06-28T18:51:45Z")

</div>

![Screenshot 2024-06-28 144305](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/9cf9b62a85bfb7a5832932f3b709236e02696e50.png)  
 ![Screenshot 2024-06-28 144249](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/b31e5c2f27b41897cec399e71b25d3f7344cb5e7.png)  
When attempting through the flow it returns a 405 error. When I test directly in the connector I get the error I stated previously where it says the header is missing or malformed. I am certain it is missing since this exact header I am inputting works in postman, and the header does not show in the operation designer after being updated.  
 ![Screenshot 2024-06-28 145058](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/7b021a47ab71b4d0a0d38320a10652d4d3c378b4.png)

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:** [July 1, 2024, 11:17am UTC](https://forum.novacura.com/t/content-range-header-wont-apply-in-rest-connector-operation/714/4 "2024-07-01T11:17:36Z")

</div>

Can you log the request to a file? (under the connector, but you need to provide a path on the server which you can access to read the output files).

I did a quick test and it seem to work:

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

---

<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:** [July 1, 2024, 7:40pm UTC](https://forum.novacura.com/t/content-range-header-wont-apply-in-rest-connector-operation/714/6 "2024-07-01T19:40:52Z")

</div>

I have made some notable changes since last post. I cannot seem to figure out how to have content-range as a parameter so I can calculate the value from within my flow. For now, I have it as a hardcoded value. I am currently running into a 401 error. The authorization token being used is from earlier in the flow that is used to generate the upload URL. It also works to do this PUT request within postman. ExcelFile references the variable from when the user uploads an excel file through file gallery. From my understanding ExcelFile.data is then the correct stream to have in the body of the request.

 ![Screenshot 2024-07-01 153106](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/a7159d7a7ee7410d2853c78c425395d1e8d1f1e2.png)  
 ![Screenshot 2024-07-01 153023](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/e581ec2618ee5c64beb414d49bea15ec882c4daf.png)  
 ![Screenshot 2024-07-01 152846](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/925a061271603a4438b218785c1349860362f467.png)  
 ![Capture1](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/8c90f776c97fcb6c10e46fb2cce0cbe4625188ac.png)  
 ![Capture](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/0abed591dc97f58a84b84653cc1d9bf6b17c459c.png)

---

<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:** [July 3, 2024, 7:40am UTC](https://forum.novacura.com/t/content-range-header-wont-apply-in-rest-connector-operation/714/7 "2024-07-03T07:40:35Z")

</div>

I remember having done a solution like that to upload a file but I cannot seem to find it right now, unfortunately.

But as far as I remember I used this:

> **[Upload small files - OneDrive API - OneDrive dev center](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_put_content?view=odsp-graph-online#http-request-to-upload-a-new-file)**

together with this setting (stream), with a put, not patch but this is just to get the screenshot:

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

If I get some time over in the coming week I will try to recreate it, but no promises.

---

<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:** [July 3, 2024, 2:21pm UTC](https://forum.novacura.com/t/content-range-header-wont-apply-in-rest-connector-operation/714/8 "2024-07-03T14:21:05Z")

</div>

Thank you! I got everything working now.

Best,  
Andrew
