How to save a PDF in a FileUpload-field

Posted by smartsysISV on 19-Oct-2016 03:13

I download aPDF form a webservice.

var documentfile=rbv_api.sendHttpGet(strURL);

The documentfile-string looks like this:

%PDF-1.4
%�����
-
-
-
5138
%%EOF

How can I save this to a fileupload-Field??

I have tried with:
rbv_api.setTextFieldValue
rbv_api.setBinaryFieldValue

and I have tried with different MIME-codetypes.

But I can't open the "file" at all.


All Replies

Posted by mpiscoso@gmail.com on 24-Nov-2016 22:53

I think before you use the setBinaryFieldValue() api you need to convert your PDF response to a base-64 string first.

I believe you should be able to find script using google that does what you need.

Hope that helps.

This thread is closed