Oct 12 2008

MeioUpload Behavior 1.0.1 released!

Category: CakePHP, PHPvbmendes @ 19:40

I am glad to show you the MeioUpload Behavior 1.0.1. An improved Upload Behavior for CakePHP 1.2. It makes file uploads as simple as defining a variable.

See the docs.

Features

  • Accepts custom directory for files to be uploaded;
  • Validates the file extension and mime-type due to the behavior configuration;
  • Validates the max file size;
  • Allow custom validation rules;
  • Allow as many thumbnails formats as you want;
  • Allow more then one field to be uploadable, with custom options per field;
  • Stores the directory, filesize, and mime-type in the database if the table has these fields;
  • Allow the use of default files and deleting files without deleting the entire record;
  • Delete files when the record is deleted or updated with a new file;
  • Also works in the $model->saveAll method.

Changelog

v1.0.1

  • Fixed a bug in the create folder method;
  • Now you can use the $validate var of the model to apply the changes to default validation rules;
  • Changed the my_array_merge function, now it’s part of the behavior, name arrayMerge;
  • Allow use of {DS}, {model} and {field} constants in directory name and fields names;
  • Fixed a bug with the replacement of the default names.

v1.0

  • Initial release

Any bugs, features suggestions, and english errors, please tell me.

Bookmark and Share

Tags: , ,

11 Responses to “MeioUpload Behavior 1.0.1 released!”

Pages: « 1 [2] Show All

  1. 11
    Francis Rebouças Says:

    Olá Vinicius…. Muito bom o seu behavior, sou um novo aventureiro do CakePHP, meu problema é o seguinte tenho que enviar uma lista de imagens de uma só vez pelo seu Behavior, por isso optei por um flash que cria a lista e as envia. As informações do arquivo fica em um $_FILES['Filedata'].

    Meu Código: if (!empty($_FILES["Filedata"])) { $this->Imagem->create(); $this->data['Imagem']['imagem']['name'] = $_FILES['Filedata']['name']; $this->data['Imagem']['imagem']['type'] = $_FILES['Filedata']['type']; $this->data['Imagem']['imagem']['tmp_name'] = $_FILES['Filedata']['tmp_name']; $this->data['Imagem']['imagem']['error'] = $_FILES['Filedata']['error']; $this->data['Imagem']['imagem']['size'] = $_FILES['Filedata']['size']; $this->Imagem->save($this->data); }

    Mas ele não resulta em nada. Não guarda nada em DB nem faz upload.

    Obrigado

Pages: « 1 [2] Show All

Leave a Reply