1 amazon.s3.uploadFile

Gets the object stored in Amazon S3 under the specified bucket and key. Returns null if the specified constraints weren't met. To get an object from Amazon S3, the caller must have Permission. Read access to the object.

<aamazon.s3.uploadFile
    bucketName='bucketName'
    fileName='fileName'
    acl='Private|PublicRead|PublicReadWrite|AuthenticatedRead|LogDeliveryWrite|BucketOwnerRead|BucketOwnerFullControl|AwsExecRead'
    multipart='multipart'
    access-key='access-key'
    secret-key='secret-key'
    region='region'
>
    <file /> +
</aamazon.s3.uploadFile>
Example
Copy
<xsql-script name='file_bytes_read_sample1'>
    <body>
    
        <println><amazon.s3.listKeys bucketName='testjabbucket' /></println>
        
        <amazon.s3.uploadFile bucketName='testjabbucket' acl='PublicReadWrite' fileName='sample_fil3_s3_name' multipart='false' >
            <file name='/Users/jab/tmp/sample_file.txt' type='absolute' />
        </amazon.s3.uploadFile>        
        
        <println><amazon.s3.listKeys bucketName='testjabbucket' /></println>
        
    </body>
</xsql-script>

Which prints in standard output:

Copy
+-------+-------+-------+------------+------------+-------+
|key    |owner  |size   |lastModified|storageClass|ETag   |
|char   |char   |long   |char        |char        |char   |
|visible|visible|visible|visible     |visible     |visible|
+-------+-------+-------+------------+------------+-------+


+-------------------+-------+-------+-----------------------------+------------+--------------------------------+
|key                |owner  |size   |lastModified                 |storageClass|ETag                            |
|char               |char   |long   |char                         |char        |char                            |
|visible            |visible|visible|visible                      |visible     |visible                         |
+-------------------+-------+-------+-----------------------------+------------+--------------------------------+
|sample_fil3_s3_name|       |     12|Mon Sep 04 17:58:20 CEST 2017|STANDARD    |2cad20c19a8eb9bb11a9f76527aec9bc|
+-------------------+-------+-------+-----------------------------+------------+--------------------------------+