Link to home
Start Free TrialLog in
Avatar of ivanblue
ivanblueFlag for United States of America

asked on

Rename and copy file uploaded using Jquery-File-Upload

Hello, I'm using JQuery File Upload plugin https://github.com/blueimp/jQuery-File-Upload, but I don't know how to copy the file when is up and rename it. I'm using PhalconPhp framework.

This is the javascript:

$('#filUserDocumentFile').fileupload({
        url: "/userattachment/upload",
        dataType: "json",
        done: function (e, data) {
            $.each(data.result.files, function (index, file) {
                $('<p/>').text(file.name).appendTo('#files');
            });
        }
    });

Open in new window


And in the controller:
public function uploadAction()
{
	$upload_handler = new UploadHandler();
}

Open in new window


Please help, thanks.
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Phalcon is very new, so new that I cannot find another PHP professional among my colleagues who has ever used it!  So rather than try to do original research, I'm just going to suggest that you take this question to their support team.
http://phalconphp.com/en/support
Avatar of ivanblue

ASKER

Yes, it's new, but my question it's not necessarily attach to the framework. I provided that info in case it was useful.

I just need to be able to use or configure the php class provided by jquery-file-upload "UploadHandler" which is already in the upload controller. I need that class to copy the uploaded file to /var/files/ and be able get original filename and be able to rename it.

This class is already functioning, I just need to change a little what it does.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial