PHP code example of kematjaya / upload-bundle
1. Go to this page and download the library: Download kematjaya/upload-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kematjaya / upload-bundle example snippets
...
use Kematjaya\UploadBundle\Type\KmjFileType;
...
...
public function buildForm(FormBuilderInterface $builder, array $options)
{
...
$builder->add('attachment', KmjFileType::class, [
'label' => 'attachment'
]);
// or add additional directory inside upload dir
$builder->add('attachment', KmjFileType::class, [
'label' => 'attachment',
'additional_path' => 'foo'
]);
...
}