Ajax Upload

modified: 2020-02-12T10:07:01+01:00

Ajax Upload with jybrid

..currently under development

// Create on inital pageload an upload request target. Make sure, flag setIsUpload is set to true
                  Request::gi(['URI' => JRoute::_('index.php?option=com_jproofestate', false)])->setIsUpload(true));

// right now, the comfort method is the button-object/class
$jybridUpload  = Button::gi('jproofestateUpload')                       // <<--- getting the trigger
                       ->set('task', 'JProofEstate/Owner/Owner/Create')  // << --- mostly i use jybrid with joomla 
                       ->setFormDataElement('.myUploadForm') // <<--- lets trigger the Upload form as automatic upload
                       ->renderUnobtrusive() // <<--- unobtrusive is pretty cool! the onclick will also work;-)
<form name="myDingens" class="myUploadForm">
    <input type="file" name="myUploadFile[]" />
    <input type="file" name="myUploadFile[]" />
    <input type="text" name="someThing">
<a class="button is-secondary is-smaller"
               href="#0" <?php echo $jybridUpload ?>>Unobtrusive Ajax Upload</a>