How to send binary data in invokeurl task?

How to send binary data in invokeurl task?

Hello,

I am using Adobe's Protect PDF API.
Source: https://developer.adobe.com/document-services/docs/overview/pdf-services-api/

Everything works fine in Postman. 

But for some reason after encrypting the file, it is empty after password protecting the PDF. Again, in Postman the file is protected correctly.

cURL in Postman:


curl --location --request PUT 'https://testurl.com' \
--header 'Content-Type: application/pdf' \
--data-binary '@postman-cloud:///1efc4376-bad2-4750-ace1-16715a7e932b'

You can see here that data is passed as binary. Basically the file is being sent like that:


Deluge:

  1. a = invokeurl
  2. [
  3. url :"https://pdfobject.com/pdf/sample.pdf"
  4. type :GET
  5. ];

  6. a=a.getFileContent();
  7. header_map.put("Content-Type","application/pdf");

  8. upload_file = invokeurl
  9. [
  10. url :uploadUri
  11. type :PUT
  12. parameters:a
  13. headers:header_map
  14. detailed:true
  15. ];
  16. a=a.getFileContent();




However I suppose in Deluge it is sending an empty file.

I have used sendmail to see what the variable a is. I can see the PDF without any issues in the email.

But for some reason it's not working in the API call

How can I fix that?


      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ



                                ご検討中の方