I'm currently developing an intranet application with symfony and came
across a nasty problem: I can't upload large files. If I upload a
regular .jpg or .doc or something it's all good, but when I upload let
say 20M the action.class.php seems to 'skip' the upload code and the
following ->save() method. Here's the code:

[code]
//FILE UPLOAD START
$projectdir =
'.'.DIRECTORY_SEPARATOR.sfConfig::get('sf_upload_dir_name').DIRECTORY_SEPARATOR.sfConfig::get('app_dir_projects').
    DIRECTORY_SEPARATOR.$project->getProjectNumber();    if(!
is_dir($projectdir))
        mkdir($projectdir);

    if($this->getRequest()->getFileName('barcode_file'))
    {
        $ext = $this->getRequest()->getFileName('barcode_file');
        $this->getRequest()->moveFile('barcode_file',
$projectdir.DIRECTORY_SEPARATOR.'barcode_'.$ext);
        $project-
>setBarcodeFile($projectdir.DIRECTORY_SEPARATOR.'barcode_'.$ext);
    }
    if($this->getRequest()->getFileName('packaging_file'))
    {
        $ext = $this->getRequest()->getFileName('packaging_file');
        $this->getRequest()->moveFile('packaging_file',
$projectdir.DIRECTORY_SEPARATOR.'packaging_'.$ext);
        $project-
>setPackagingFile($projectdir.DIRECTORY_SEPARATOR.'packaging_'.$ext);
    }
    $project->setNotes($this->getRequestParameter('notes'));

    $project->save();
    return $this->redirect('project/show?id='.$project->getId());
[/code]

With large files, it redirects to 'project/show/id' instead of
'project/show/id/<number>'

Any help at all appreciated!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to