• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Issue with uploading PDF file in API

New Here ,
Jan 23, 2023 Jan 23, 2023

Copy link to clipboard

Copied

Hi,

 

I am working on converting PDF files into images thanks to the Adobe PDF Services API. As you may already know, the conversion consists of 6 consecutive requests :

 

  1. POST : Exchange JWT for Access token ;
  2. POST : Get upload pre-signed URI ;
  3. PUT : Upload asset to cloud provider ;
  4. POST : Create job (convert into image) ;
  5. GET : Fetch status ;
  6. GET : Download asset.

 

All of the above API’s are working perfectly fine in Postman. But now that I have built the corresponding automation in SAP Cloud Factory, I’m getting the following error at step 5 (Fetch status) :

2132828-image.png

The overall automation looks like this :

2132829-image.png

After a couple of tests, I have reasons to believe the issue might come from step 3 (Upload asset), which I have built using the following code :

2132830-image.png

 

2132831-image.png

I think the body is what is causing trouble, and even though it’s a pretty straightforward piece of code, there’s something my low level of coding stops me from doing correctly. Note that in Postman I upload the file using the binary option.

 

Thanks for your assistance on this.

 

Kind regards,

 

LM.

 

 

 

The overall automation looks like this :

 

 

 

 

After a couple of tests, I have reasons to believe the issue might come from step 3 (Upload asset), which I have built using the following code :

 

 

 

 

 

 

 

I think the body is what is causing trouble, and even though it’s a pretty straightforward piece of code, there’s something my low level of coding stops me from doing correctly. Note that in Postman I upload the file using the binary option.

 

Thanks for your assistance on this.

 

Kind regards,

 

LM.

Views

548

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 26, 2023 Jan 26, 2023

Copy link to clipboard

Copied

LATEST

I don't think you can just strignify the PDF and have it work. You're going to need to submit the file as formdata.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources