The type amtac_fileuploads simplifies handling of uploaded files by wrapping the native file upload methods with easy to use calls. It can be used with the same simplicity for both single file uploads as for batch uploads.
Examples:
var(myfiles = amtac_fileuploads)
$myfiles -> size // how many files that where uploaded or handled by the type
$myfiles -> contenttype(3) // return content type for the third of the batch uploaded files
$myfiles -> fieldname
$myfiles -> filesize(2)
$myfiles -> filename
$myfiles -> tmpfilename(5)
$myfiles -> suffix
$myfiles -> save('/path/to/file/filename.sfx')
or
$myfiles -> save('/path/to/file/filename.sfx', -overwrite, -count = 2)
An actual file can also be retrieved as a file object from amtac_fileuploads using
$myfiles -> file
or
$myfiles -> file(2)
Short hand examples, no need to create a type first
amtac_fileuploads -> file // will return the uploaded file as a file object
amtac_fileuploads -> save('/path/to/file/filename.sfx')
Our users appreciate the stability and speed with how our upload services work.
Project manager: "Yes, yes, that's all very nice. Now let's get on with the rest of the tasks."
Fellow coder: "Cool, that's really useful!"
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft