Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony]sfThumbnailPlugin nie działa getFilePath
stirith
post
Post #1





Grupa: Zarejestrowani
Postów: 162
Pomógł: 2
Dołączył: 18.01.2008

Ostrzeżenie: (0%)
-----


W symfony 1.2 nie ma czegoś takiego jak "getFilePath"

No to jak mam pobrać ścieżkę do pliku dla:

Kod
  $thumbnail->loadFile();

cały kod:
Kod
    foreach ($this->getRequest()->getFiles('file') as $fileName) {

  // Create the thumbnail
  $thumbnail = new sfThumbnail(150, 150);
  $thumbnail->loadFile($this->getRequest()->getFilePath('file'));
  $thumbnail->save(sfConfig::get('sf_upload_dir').'/images/'.$fileName, 'image/jpg');

  // Move the uploaded file to the 'uploads' directory
  $this->getRequest()->moveFile('file', sfConfig::get('sf_upload_dir').'/'.$fileName);
}
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 14:06