Hi !!
i'm trying to use an upload file action.
I trie my code without Symfony2, and it works fine.
but, when i'm trying to do this winthin Sf2, with the same code, my
move_uploaded_file() function doesn't works.

I have this error "Warning: move_uploaded_file(/egoodealer/web/uploads/
avatar.PNG) [<a href='function.move-uploaded-file'>function.move-
uploaded-file</a>]: failed to open stream: No such file or directory
in C:\Documents and Settings\ITycomdev\workspace\egoodealer\src
\Application\ProductBundle\Controller\ProductController.php line 47"
using window, I have check permissions of the tmp file, and it seems
ok on this side (plus, I don't have this problem with my previous test
without Sf2)

Here is my code
the php side :
if (!empty($request->files)) {
$userfile = $request->files->get("userfile");
                        if (is_uploaded_file($userfile["tmp_name"])) {
                                $tempfile = $userfile['tmp_name'];
                                $targetfile = 
$request->request->get('folder').'/'.
$userfile['name'];
//                              die();
                                var_dump(move_uploaded_file($tempfile, 
$targetfile));
                        }
                }

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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

Reply via email to