amazonS3Upload ( string accessKey , string secretKey , string bucketName , string amazonPath , string localPath , string _zone ) : void
Upload a file to an Amazon S3 server.
Example
bucketName = "toto"
pathAmazon = replace(replaceAccents("product_document/"+Product_Type+"/"+manufacturer+"/"+file+"."+extension), " ","_")
amazonS3Upload(accessKey, secretKey, bucketName, pathAmazon, path("desktop")+"myFile.pdf", "eu-west-3")
webUrl = "https://"+bucketName+".s3.eu-west-3.amazonaws.com/"+pathAmazon
See also
ftpUploadParameters
accessKey
Access key provided by the Amazon API.
secretKey
Secret key provided by the Amazon API.
bucketName
Name of the Amazon bucket. You can tell by the shape of the external access URL: https://BUCKETNAME.ZONE.amazonaws.com/AMAZONPATH.
amazonPath
Path of the file uploaded to Amazon S3.
localPath
Path to the file on your hard drive.
_zone (optional)
Geographical zone of your server. Default: "us-east-1" (it is recommended that you specify this explicitly). You can identify this by the shape of the external access URL: https://BUCKETNAME.ZONE.amazonaws.com/AMAZONPATH.