dev-master
9999999-dev https://github.com/kapilpatel20/bvi-fileuploadFile upload, resize image, water mark on images
proprietary
by Rahul Trivedi
fileupload
File upload, resize image, water mark on images
*******Documentation******** Run below command to install from composer, (*1)
composer require kapilpatel20/bvi-fileupload dev-master, (*2)
Add bundle in AppKernel.php in registerBundles function, (*3)
new BviFileUploadBundle\BviFileUploadBundle(),, (*4)
******General Settings**********, (*5)
//Water mark tag settings, (*6)
$data['watermark'] = true or false; $data['main_water_mark_path'] = // Main water mark thumb image if watermark option true, (*7)
//Upload file, (*8)
$info = $this->get("bvi.helper.upload")->fileHandler($data,$_FILES);, (*9)
params $data as configuration array params $_FILES as file object, (*10)
//Generate Thumbs settings, (*11)
***For example************** $sizeArr = array(); $sizeArr[0]['destW'] = 165; $sizeArr[0]['destH'] = 165;, (*12)
$sizeArr[1]['destW'] = 350; $sizeArr[1]['destH'] = 350;, (*13)
Here params or index key are as:, (*14)
destW is width of thumb image destH is height of thumb image, (*15)
$data['resize'] = true; $data['dims_arr'] = $sizeArr;, (*16)
//Upload and generate thumbs file, (*17)
$info = $this->get("bvi.helper.upload")->fileHandler($data,$_FILES);, (*18)
//If you want to apply water mark as per generate thumbs:, (*19)
$dataDimWaterMark = array(); $dataDimWaterMark[0] = 'WATER MARK IMAGE PATH ONE'; $dataDimWaterMark[1] = 'WATER MARK IMAGE PATH TWO';, (*20)
$data['water_dims_img'] = $dataDimWaterMark;, (*21)
*/, (*22)
// Delete a file, (*23)
$this->get("bvi.helper.upload")->removeFiles('MEDIA_ID','BASIC_PATH','FILE_NAME');, (*24)
**/, (*25)
File upload, resize image, water mark on images
proprietary
fileupload