Hello!
I have exactly the same problem and I found the follwing solution:
In the file sfProjectConfiguration.class.php
public function setWebDir($webDir)
{
sfConfig::add(array(
'sf_web_dir' => $webDir,
'sf_upload_dir' => $webDir.DIRECTORY_SEPARATOR.'uploads',
'sf_upload_dir_name' => 'uploads',
));
I added the last line in the array 'sf_upload_dir_name' => 'uploads' and
now sfConfig::get('sf_upload_dir') works.
If you found by now an other/better solution, please let me know!
Thanks and greetings!
Peter
PS: sorry for my bad english!
David schrieb:
> Hi guys!
>
> I'm using symfony 1.2 and uploading a picture in my application.
>
> The path is set with sfConfig::get('sf_upload_dir').
>
> Now I need to include the file in the template. I found the
> sfConfig::get('sf_upload_dir_name') with google to get the web path to
> the upload dir, but it seems that this doesn't work anymore in sf 1.2.
>
> So did just the name change or is there no sf_upload_dir_name in the
> default config anymore? And also if there is no sf_upload_dir_name
> since 1.2, why is still a sf_upload_dir var available in the default
> config?
>
> I'm looking forward to your answere.
>
> Best Regards,
>
> David
>
> >
>
--
Peter Kreutzer - Praelat-Neun-Str. 17 - D-94227 Zwiesel
Tel.: +49(0)9922-5529 - Fax: +49(0)9922-609974
http://www.kreutzer-peter.de/ - http://www.kreutzer-webdesign.de/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---