File Upload - Amazon S3 Storage or Alpha Anywhere Server
Upload one or more files to Amazon S3 or to the Alpha Anywhere server.
Used with the UX component.
- Upload target
Specify the target server to which files should be uploaded. You can upload to Amazon S3, or the Alpha Anywhere server. Choices include S3, AlphaAnywhere.
- Xbasic function
Specify the name of the Xbasic function to call once each file has been uploaded.
- Method for selecting files
Specify if the user can select the file(s) to be uploaded, or if the data for the file to be uploaded will be supplied (in the form of a base64 encoded string -- that is formatted as a 'data URI' e.g. data:image/jpeg;base64,/sjsakjjs....). Choices include User selects file(s), Base64Data.
- Method for specifying Amazon S3 credentials and bucket
Should the Amazon S3 credentials and bucket be read from a named storage connection string, or do you want to specify explicit values for the access key, secret and bucket. Choices include Named Storage Connection String, Explicit.
- Storage connection string
Specify the named storage connection string. IMPORTANT: The storage connection string MUST NOT BE ENCRYPTED. TIP: To define a storage connection string, go to the Tools menu in the Web Projects Control Panel.
- Access key
Specify the access key.
Specify the secret.
Specify the bucket.
- Authenticated read
Specify if authentication is required to read the object once it has been uploaded to S3
- S3 Timeout
Specify the S3 timeout in milliseconds. This is the amount of time allowed before authorization to upload files to S3 will expire. If you have a lot of files to upload, you may want to increase this value. Suggested value is 600.
- Allow mutiple files
Specify if the user can upload multiple files at once, or just a single file.
- Maximum file size
Specify the maximum size file that the user can select. Set to -1 for no maximum.
- Max file size exceeded error message
- Max total file size
Specify the maximum total size of all selected files. Set to -1 for no maximum.
- Max total file size exceeded error message
- Allowed file types
Enter a comma delimited list of allowed file extensions. Leave blank to allow all file extentions.
- Invalid file type error message
- Display progress during file upload
Specify if progress should be shown while file(s) are being uploaded.
- Allow cancel
Specify if the user can cancel an upload while the file is being uploaded.
- Progress indicator type
Specify the progress indicator style. 'Text' - display the percentage as text, 'Bar' - display a progress bar. Choices include Text, Bar.
- Progress bar color
Specify the progress bar color.
- Progress bar width
Specify the progress bar width. Use CSS units.
- Placeholder for progress indicator
Specify the name of a Placeholder control where the progress indicator should be shown.
- Target object name on Amazon S3
- Before file select
- After file select
Fires after file(s) have been selected, but before any files have been uploaded. If your code includes 'return false' the upload is aborted. You code can reference 'e' - an array of objects with information about each file selected. Each item in the array contains these properties: name, size, type.
- On Progress
Fires when another 'chunk' of the file being uploaded has been sent. This event allows you to write custom progress displays. Your code can reference these variables: e.percent - percentage complete, e.message - message describing the current state of the upload operation, e.name - name of the file being uploaded, e.number - if more than one file was selected, the number of file, e.size - the file size and e.type - the mime-type of the file, e.targetName - the name to use on Amazon to store the file (usually the same as e.name unless your 'Target name on Amazon S3' function returned a different name or specified a folder)
- On Error
- On Upload Complete - Individual File
Fires after a file upload has been completed. This event will fire for each individual file this is uploaded and the 'On Upload Complete - All Files' event will fire after all files have been uploaded. Your code can reference this variables: e.name - name of the file just uploaded, e.type - mime-type, e.aborted - true if the user cancelled, e.size - file size, e.number - if more than one file was uploaded, the number of the file and and e.targetName - the name to use on Amazon to store the file (usually the same as e.name unless your 'Target name on Amazon S3' function returned a different name or specified a folder).
- On Upload Complete - All Files
Fires after all selected files have been uploaded. You code can reference e.fileArray - an array of objects containing information about each file that was uploaded. Each item in the array has these properties, name, size, type,aborted, targetName (name used on Amazon - same as name unless you specified a different name).
- On Upload Complete
Fires after the selected file has been uploaded. Your code can reference this variables: e.name - name of the file just uploaded,e.aborted - did the user abort the upload, e.type - mime-type, e.size - file size, e.targetName - name used on Amazon.
- On validate error