felgharb
felgharb

Reputation: 89

chunked file upload with blueimp and oneuploaderbundle

I am trying to upload big files using Symfony (with OneUploaderBundle) and Jquery File-Upload. It looks like my program does only one chunk (I can see the chunk in the filesystem) and then fail with a message :

"Error: Call to a member function getBasename() on a non-object".

My code looks like this :

JS

$('#fileupload').fileupload({
    formData: {prestation: prestation},
    acceptFileTypes:  /(zip)|(rar)$/i,
    maxFileSize: 100000000,
    maxChunkSize:  3000000, 
});

PHP

I do not know what to do to be honest, I believe I have to return something so that the second chunk can run but I don't know what. I have started checking the events, especially the PostChunkUploadEvent with no luck...

//An upload Listener
 public function onChunkUpload(PostChunkUploadEvent $event)
{
    $request = $event->getRequest();
    $response = $event->getResponse();
    $chunk = $event->getChunk();
}

I saw also that Jquery File-upload provides a PHP upload handler here but not sure how to use it with OneUploaderBundle.

Im a bit lost, any Help ?

Thanks a lot

Upvotes: 0

Views: 1277

Answers (1)

felgharb
felgharb

Reputation: 89

Finally, I got the answer.

The problem was coming from my filesystem. Using Gaufrette solved things...

Upvotes: 0

Related Questions