Unable to create folder in minio through robot plugin

Hello Team,

I have faced issue while creating folder through robot plugin script.

I am able to download ,upload delete the folder using the script .but not able to create folder in the s3 minio.
s3Key = “screenshots/test_folder”;

                S3.createFolderS3(s3EndpointUrl, signerType, accessKey, secretKey, bucket,  s3Key);

it throws :

Unable to verify integrity of data upload. Client calculated content hash (contentMD5: 1B2M2Y8AsgTpgAmY7PhCfg== in base 64) didn’t match hash (etag: in hex) calculated by Amazon S3. You may need to delete the data stored in Amazon S3. (metadata.contentMD5: null, md5DigestStream:

details exception

12:13:19 [WARN] [urn:uuid:01FD4DF2F95588325E15513361961553] robotics-flow plugin execution exception : org.webharvest.exception.ScriptException:
Config line 7: script block
org.openqa.selenium.WebDriverException: Failed to execute script. Unable to verify integrity of data upload. Client calculated content hash (contentMD5: 1B2M2Y8AsgTpgAmY7PhCfg== in base 64) didn’t match hash (etag: in hex) calculated by Amazon S3. You may need to delete the data stored in Amazon S3. (metadata.contentMD5: null, md5DigestStream: com.amazonaws.services.s3.internal.MD5DigestCalculatingInputStream@1d9f6ca9, bucketName: test, key: leave_Plan/)
Build info: version: ‘9.2.0.4’, revision: ‘1a10eeeced’, time: ‘2018-11-29T10:44:59.891Z’

Could you please help out for this .

below is the whole code

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

		<robot driver="universal">

			<script><![CDATA[ 
accessKey="admin"
                          secretKey="admin123"
                          s3EndpointUrl   = "http://localhost:15110";
                          signerType                          = "S3SignerType";
                          bucket                                  = "test";
                         // s3Key                                    = "FinalReport/Final_Report.xlsx";
                          s3Key                                   = "leave_Plan/leavePlan.xlsx";
                          def targetPathminio                  = "E:\\lucy1.0\\Supporting Bots\\Supporting Bots\\input files\\leavePlan.xlsx"
                           //def targetPathminio1                  = "E:\\InsertExcelFiles\\Exception_Report.xlsx"
                           s3Key			= "screenshots/test_folder";

                    

                    S3.createFolderS3(s3EndpointUrl, signerType, accessKey, secretKey, bucket,  s3Key);

                    
                           //S3.deleteFolderFileS3(s3EndpointUrl, signerType, accessKey, secretKey, bucket, "leave_Plan");
                           
                           
                          //FileLocation        = S3.downloadFileS3(s3EndpointUrl, signerType, accessKey, secretKey, bucket, s3Key, targetPath);
                          s3FileLocation    = S3.uploadFileS3(s3EndpointUrl, signerType, accessKey, secretKey, bucket, s3Key,targetPathminio, S3OverwriteStrategy.SKIP)
                          //s3FileLocation1    = S3.uploadFileS3(s3EndpointUrl, signerType, accessKey, secretKey, bucket, s3Key1,targetPathminio1, S3OverwriteStrategy.SKIP)
]]></script>
	</robot>

	</robotics-flow>


    <export include-original-data="true"></export>

</config>

Hello @diptiranjanpanda
Which version of RPA Express gave you this exception? You can check it in Control Panel - Programs - Programs and Features.

i have used the latest version please find the attached image for version for the same

Thanks @diptiranjanpanda.
I see in your code 2 s3Key variables. Did you try to comment unnecessary and try with the only?

Thanks for your update .i have tried also only one s3key variable but getting same exception as previous.

Are you able to create this folder manually as described in our guide https://kb.workfusion.com/display/RPAe/File+Storage ?

Yes i am able to create folder manually though file structure.
i able to do all option through robot plug in .but not able to create the folder though robot plug in .

Thank you. I could reproduce on my side as well. I have information that this API is not supported. But for your local File Storage you can use simple folder creation option. Please see my script below.

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">
    <robotics-flow>
	<robot driver="universal">
	
       <script><![CDATA[ 
                          def newDir = "C:\\RPAExpress\\minio\\data\\test";
                          Resource.createDirectoryOverwrite(newDir);                                                 
                           
		]]></script>
	</robot>
	</robotics-flow>

    <export include-original-data="true"></export>

</config>
1 Like

Hi @diptiranjanpanda.

Does this solution help you?

Any update on “uploadFileS3”?
I see the API for this function at: https://workfusion-docs.s3.amazonaws.com/rpa-simplified-api/latest/com/workfusion/rpa/helpers/S3.html#uploadFileS3-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-com.workfusion.rpa.helpers.S3OverwriteStrategy-long-

I would prefer to use code instead of xml.

What kind of value does the parameter “String signerType” take?
That parameter is not explained while the other ones are.