Multiupload failed to open stream
- Gavrilo
- Člen | 46
Ahojte, mám problém s upload obrázkov na FTP. Cesta v chybovej hláške je správna rovnako tak priečinky existujú a práva su nastavené. Zvláštne mi príde že sa súbor nikde neuploadne.
foreach ($values->attachment as $image) {
if ($image->isImage() and $image->isOk()) {
$image_ext = strtolower(mb_substr($image->getSanitizedName(), strrpos($image->getSanitizedName(), ".")));
$image_name = $values->product_code . $image_ext;
$truncate = Strings::lower(Strings::truncate($values->product_code, 3, ''));
$main_folder = '/images/product_images' . $truncate;
$small_folder = '/images/product_images/' . $truncate . '/small/';
$medium_folder = '/images/product_images/' . $truncate . '/medium/';
$image->move($this->context->parameters['wwwDir'] . $main_folder . '/' . $image_name);
/* Medium image*/
$image->resize(241, 241, Image::EXACT);
$image->sharpen();
$image->save($this->context->parameters['wwwDir'] . $medium_folder . $image_name);
}
}
Warning
imagepng(/www/e/l/u109443/public_html/www/images/product_images/aaa/medium/AAA.png):
failed to open stream: No such file or directory