Upload to S3 - PDF file upload issue



I’m using the following code to upload a pdf file into S3 in one of Business Process steps. I can see the file getting uploaded, however when I open the file I see it all blank. The size of file before upload and after upload more or less matches (but not exact size). I’ve pasted the code below. Am I missing any important step there?

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">

<required name="ocrlink"/>

<var-def name="pdf_content">
	<file path="${ocrlink}" />

<var-def name="document_uuid">

<var-def name="s3_invoice_link">
	<s3 bucket="public">
		<s3-put-public path='pretraining/pdf/${document_uuid}.pdf' content="${pdf_content}"/>

<export include-original-data="true">
	<single-column name="s3_invoice_link" value="${s3_invoice_link}" />




@JThangaswamy - are you using the RPA Express?


Yes. I’m using RPA Express 1.1.0.



@JThangaswamy -
It looks like the file you read with is empty of can not be read.
What is the value of the ${ocrlink} variable? Can you export it and make sure the file is there.


${ocrlink} points to a file location (file://D/OCR.pdf). The file is getting uploaded and the size of the file also approximately similar to the original file (i do see some difference in file size).


@JThangaswamy - try to upload the document to the S3 file storage and get the http link to it - https://kb.workfusion.com/display/RPAe/S3+File+Storage


Hi azinchuk,
I am trying to do the same thing (uploading pdf files on S3) I am using the workfusion studio.
kindly find my code:

<?xml version="1.0" encoding="UTF-8"?>
  <export include-original-data="true">
    <single-column name="loss_run" value="${file_S3_Location}"/>

I am getting the output csv file with the http link. but when I am opening the link it is giving me error.

Kindly give me the correct solution.