File Upload schlug fehl / File upload failed

29.09.2016 17:11
#1
Baasel
Joomshopping forum user no avatar
Name: Sebastian
16.09.2016
Posts: 6
Quote
File Upload schlug fehl / File upload failed

Hallo,

ich habe im Backend über Produkte > Produkt auswählen einen neuen Reiter namens Produktdetails hinzugefügt und einen neuen Input <input type="file" class="product_image" name="product_image_detailimage" id="product_image_detailimage"/> erstellt.

Die Daten werden in /administrator/components/com_jshopping/models/products.php verarbeitet. Warum kommt "product_image_detailimage" dort niemals an.

Hier die Datei products.php:

function uploadDetailImages($product, $product_id, $post){

$blaa = $_FILES['product_image_detailimage'];

foreach ($blaa as $key => $value) {
$app->enqueueMessage('key: '.$key.' value: '.$value, 'message');
}
/*
Ausgabe von enqueueMessage
key: name value:
key: type value:
key: tmp_name value:
key: error value: 4
key: sizev alue: 0
*/
$jshopConfig = JSFactory::getConfig();
$dispatcher = JDispatcher::getInstance();

$upload4 = new UploadFile($_FILES['product_image_detailimage']);
$upload4->setAllowFile(array('jpeg','jpg','gif','png'));
$upload4->setDir($jshopConfig->image_product_path);
$upload4->setFileNameMd5(0);
$upload4->setFilterName(1);
if ($upload4->upload()){
$name_image = $upload4->getName();
@chmod($jshopConfig->image_product_path."/".$name_image, 0777);
}else{
if ($upload4->getError() != 4){
JError::raiseWarning("", "ist kein Fehler, Bild wurde hochgeladen...");
saveToLog("error.log", "SaveProduct - Error upload image. code: ".$upload4->getError());
}
}
unset($upload4);
}


Viele Grüße
Sebastian


Joomla: 3.5.1
JoomShopping: 4.9.2
 
30.09.2016 07:58
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25919
Quote
Aw: File Upload schlug fehl / File upload failed

See log
error code?

 
30.09.2016 09:06
#3
Baasel
Joomshopping forum user no avatar
Name: Sebastian
16.09.2016
Posts: 6
Quote
Aw: File Upload schlug fehl / File upload failed

The only error log is this:


$blaa = $_FILES['product_image_detailimage'];

foreach ($blaa as $key => $value) {
$app->enqueueMessage('key: '.$key.' value: '.$value, 'message');
}
/*
Ausgabe von enqueueMessage
key: name value:
key: type value:
key: tmp_name value:
key: error value: 4
key: sizev alue: 0
*/


input name "product_image_detailimag" is not passed.

by the way: the function uploadImages in /administrator/components/com_jshopping/models/products.php works perfectly. This means all <input> vars are processed.

 
30.09.2016 10:35
#4
Baasel
Joomshopping forum user no avatar
Name: Sebastian
16.09.2016
Posts: 6
Quote
Aw: File Upload schlug fehl / File upload failed

More: When i see the html source code from www.......de/administrator/index.php?option=com_jshopping&controller=products&task=edit&product_id=333

I have 2 times <div id="product_tabs" class="tab-pane"> and 2 times <input type="file" class="product_image" name="product_image_detailimage" id="product_image_detailimage"/>

i dont know why!?

 
30.09.2016 12:08
#5
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25919
Quote
Aw: File Upload schlug fehl / File upload failed

Sorry. I do not know where the problem is.
php congfiguration

max_file_uploads
upload_max_filesize
post_max_size
max_input_time
max_execution_time

 
30.09.2016 12:46
#6
Baasel
Joomshopping forum user no avatar
Name: Sebastian
16.09.2016
Posts: 6
Quote
Aw: File Upload schlug fehl / File upload failed

ahhh iam so stupid

i have the solution...

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.