Wallogit.com
2017 © Pedro Peláez
Uploading files have been a challenge with Agile Toolkit. Filestore and "Upload" field have had a great functionality allowing you to upload files much simpler, however the upload field didn't provide all the great features and flexibility it could., (*1)
This add-on implements a better upload field., (*2)
Simple file uploading, just one file, after complete says "Upload OK", (*3)
Notes:, (*4)
NOTE: Perhaps will re-shuffle those views to group them, (*5)
$uploader = $this->add('romaninsh/upload/View_Uploader');
$uploader -> setModel('filestore/File');
This works without a form. Simply relies on BlueImp Uploader here. You can specify $uploder->options to change anything about the uploading. You can use hook "uploaded" to do something useful with this., (*6)
Test case: test/romaninsh/upload/test1, (*7)
$uploader = $form->addField('romaninsh/upload/Upload','file_id');
$uploader -> setModel('filestore/File');
After file is uploaded will put the model->id inside a hidden 'file_id' field. This field automatically relies on View/FileAdmin or View/ThumbAdmin (depending on your model) to display uploaded file. It will also hide upload field after successful upload and show it back if you remove the file., (*8)
Will also trigger 'upload' so that it's more or less compatible with previous uploader implementation., (*9)
If you enable multi-file use, then it would be relying on the lister view., (*10)