Steps to upload file & update database

Hi!

I want write an ajax uploader in yii but I don’t know wich is the best way.

I need this steps:

  1. validate form (for title and description of the file)

  2. Upload the file via AJAX (showing a percentaje of uploaded file)

  3. Update the database with the new record.

Wich is the best and simple form to do this? I see some extensions but I don’t like it at all.

Note: I need this for upload big files, 150MB/200MB.

Sorry for my english…:blush: And thanks!

You should look at the extentions repository

it might have just what you need :wink:

Thanks Kiriakos, I have been looking the extensions repository but I don’t find the desidered funcionality…Ajax, form validation, update the database…

I sent you to the extensions repo because it has the eajaxupload in it. You still will need to do most of the logic on your own, ie:

If you want to validate the form before upload you will need to add a special handler to the form elemnts or use the ajax valitadion gii crud_generator creates.

If you want to keep the data of the files in db create a table and php model for that object and use it inside the controller of the upload.

Hi Kiriakos, I saw this extension but I saw some bad comments like: