cancel
Showing results for 
Search instead for 
Did you mean: 

File appears to get truncated when Posting/Upload using ReadyAPI

SOLVED
Occasional Visitor

File appears to get truncated when Posting/Upload using ReadyAPI

Hello,

I have an inconvenince that I am trying to resolve.

 

I am tryin to configure ReadyAPI 3.1.0 to use a specific Rest service with a POST method that is used to Upload files. From the documentation, I assume I configured the API correctly in Ready API. But when I run the commend to upload, the file size does not match and appears to get truncated. This makes the file unusable.

 

I tried to use the example in the Oracle site to use Postman and that works fine. I can upload the file and it looks good. Oracle said it's Ready API problem so here I am asking you all...

 

Ready API 3.1.0 configuration for this:

 

Method: POST

Request Media Type: application/octet-stream

Request Attachments:

 

Response:

 

HTTP/1.1 200 OK
Date: Wed, 12 Feb 2020 22:48:00 GMT
Server: Oracle-Application-Server
P3P: X-CONTENT-TYPE-OPTIONS:nosniff
X-EPM_FUNCTION: EPM Automate
X-EPM_OBJECT: isFirst=true,chunkSize=5000000,isLast=true,File Name=pbcs_delete.csv
X-EPM_ACTION: Upload File
Vary: Accept-Encoding,User-Agent
HttpOnly;HttpOnly;Secure
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8
Content-Language: en
Strict-Transport-Security: max-age=31536000 ; includeSubDomains

{"status":0,"details":null,"links":[{"data":null,"action":"POST","rel":"self","href":"https://pbcs.us2.oraclecloud.com:443/interop/rest/11.1.2.3.600/applicationsnapshots/pbcs_delete.csv/..."}]}

 

There is an exampl here using Postman and I use that no issue.

https://docs.oracle.com/en/cloud/saas/enterprise-performance-management-common/prest/upload.html

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: File appears to get truncated when Posting/Upload using ReadyAPI

You may go thru the below documentation. So basically use "multipart/form-data" or so as mentioned in below link
https://support.smartbear.com/readyapi/docs/requests/attachment/rest.html


Regards,
Rao.

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: File appears to get truncated when Posting/Upload using ReadyAPI

Hi @edavidramos,

The headers of your request appear to indicate youre using the application/octet-stream Content-Type header.
This type is typically used for binary files.
What is the file type of the file you are publishing in your Post request?

It would help to have a bit more info relative to the content/payload and headers of the request. All you need to do is strip the security detail from it (auth details, servername in URL and anything relevant in your payload), but at first glance id look at the Content-Type of the.request

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Community Hero

Re: File appears to get truncated when Posting/Upload using ReadyAPI

You may go thru the below documentation. So basically use "multipart/form-data" or so as mentioned in below link
https://support.smartbear.com/readyapi/docs/requests/attachment/rest.html


Regards,
Rao.

View solution in original post

Highlighted
Community Manager

Re: File appears to get truncated when Posting/Upload using ReadyAPI

Thank you richie and nmrao!

 

@edavidramos were you able to solve the issue? Please share if the suggestions helped.



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!