2017 © Pedro Peláez
 

library jv-upload

A generic Upload files module for ZF2.

image

jaimevalasek/jv-upload

A generic Upload files module for ZF2.

  • Thursday, October 3, 2013
  • by jaimevalasek
  • Repository
  • 1 Watchers
  • 1 Stars
  • 56 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

JVUpload - JV Upload

Create By: Jaime Marcelo Valasek, (*1)

Use this module to upload files., (*2)

Futures video lessons can be developed and published on the website or Youtube channel http://www.zf2.com.br/tutoriais - http://www.youtube.com/zf2tutoriais, (*3)

Installation

Download this module into your vendor folder., (*4)

After done the above steps, open the file config/application.config.php. And add the module with the name JVUpload., (*5)

Pendencies modules

  • To use the module you must also install the following modules:

JVConfig - https://github.com/jaimevalasek/JVConfig JVEasyPhpThumbnail - https://github.com/jaimevalasek/JVEasyPhpThumbnail JVMimeTypes - https://github.com/jaimevalasek/JVMimeTypes, (*6)

With composer

  1. Add this project and JVEasyPhpThumbnail + JVMimeTypes + JVConfig in your composer.json:
"require": {
    "jaimevalasek/jv-upload": "dev-master"
}
  1. Now tell composer to download JVUpload by running the command:

php php composer.phar update, (*7)

Post installation

1.Enabling it in your application.config.php., (*8)

<?php
return array(
    'modules' => array(
        // ...
        'JVConfig',
        'JVEasyPhpThumbnail',
        'JVMimeTypes',
        'JVUpload',
    ),
    // ...
);
  1. Configure the array configuration module JVConfig or in your main module
<?php
return array(
    // ...
    'jv-upload' => array(
        'types' => array(
            'image', 'audio', 'video', 'app', 'thumb', 'text', 'file', 'custom'
        ),
    ),
    // ...
);

Using the JVUpload

Basic image example

$upload = new \JVUpload\Service\Upload($this->getServiceLocator()->get('servicemanager'));
$upload->setType('image')
    ->setThumb(array('destination' => '/conteudos/thumbs', 'width' => 200, 'height' => 250, 'cropimage' => array(2,0,40,40,50,50)))
    ->setExtValidation('ext-image-min')
    ->setSizeValidation(array('18', '200')) // validation of the file size in KB array (min max).
    ->setDestination('/conteudos/imagens')
    ->prepare()->execute();

The Versions

03/10 2013

dev-master

9999999-dev https://github.com/jaimevalasek/JVUpload

A generic Upload files module for ZF2.

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 upload jaimevalasek