Update link pictures and Insert new item

  • nole52

    14 messages

    France

    I have some cards with no pictures because i haven't upload these on my server, so i make a code to update the cards with the pictures after upload but i see no change.

    Moreover, i tried to add new cards and the delcampe server said ok, but i can't see them on my shop.

    Can you say me why?

    I use rest API, and when i upload new cards one or two hours before it worked but now no.
  • nole52

    14 messages

    France

    OK, the insert of item is ok, it take long time but it work... i think the servers are long.

    But i can't have the pictures, it not download it, so i have lot of item without pictures.

    So i tried to update image links but nothing happen, but the script say me it's ok...
  • @thomas
    Administrateur

    348 messages

    Belgique

    OK, the insert of item is ok, it take long time but it work... i think the servers are long.

    But i can't have the pictures, it not download it, so i have lot of item without pictures.

    So i tried to update image links but nothing happen, but the script say me it's ok...
    • Posté le 19 nov. 2020 à 17:53
    • #1213198
    Hello nole52,

    I tested the api on my side and did not encounter any problem to update images.

    Which host do you use to store your images?
    Can you give me an example of a call you made to update an item?

    Also note that any insertion or update of an item may take some time.

    Best Regards,
    --
    Thomas
    Delcampe Team
  • nole52

    14 messages

    France

    Hello nole52,

    I tested the api on my side and did not encounter any problem to update images.

    Which host do you use to store your images?
    Can you give me an example of a call you made to update an item?

    Also note that any insertion or update of an item may take some time.

    Best Regards,
    --
    Thomas
    Delcampe Team
    • Posté le 20 nov. 2020 à 08:40
    • #1213465
    I use easy-hebergement.

    Here my code example :

    // IMAGES A UPDATE
    $postData = array(
    'item' => array(
    'images' => array(
    '.$url1.',
    '.$url2.'
    )
    )
    );


    //met à jour les images
    //RESOURCE CALL WITH PUT METHOD
    $url = ' Lien (https) ;
    $ch = curl_init();
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($postData) );
    curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, "PUT");
    curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    $xml_response = curl_exec($ch);


    $dom = new \DOMDocument();
    $dom->loadXML($xml_response);
    $statusresult = $dom->getElementsByTagName( "status" )->item(0)->nodeValue;

    //si l'item renvoi un résultat cest ok
    if($dom->getElementsByTagName( "status" )->length > 0)
    {
    echo "Update ok <br />";
    }
    else
    {
    echo "Erreur dans l'update : ".$dom->getElementsByTagName( "error" )->item(0)->nodeValue." <br />";
    }



    Each update say me it's ok
  • nole52

    14 messages

    France

    Ok, i tried the upload with my old website and it work... but i suspect that my new don't work because my new web adress is like : http : // mywebsite.cluster3.easy-hebergement.net/images/myimage.jpg

    Perhaps it's don't want to work because of the multiple "." for the adress or the "-" ?

    When i tried directly the adress of my image it work, so it's perhaps your server who don't want accept it?
  • nole52

    14 messages

    France

    It's not good at all... with my old website it not upload all the images too... i have some item who good upload but some other are not uploaded and i don't know why... but the links of the images in my website are good.

    Can you help me and say me why it doesn't work good?
  • elenashvarts

    11 messages

    Kazakhstan

    Alas, I also get problems loading images. It started two weeks ago.
    Since then, 10% of the images have not been uploaded.
    My hosting hasn't changed, everything worked well before.
  • elenashvarts

    11 messages

    Kazakhstan

    Hello.
    Do members of the gold club receive priority service?
    We asked questions - but the problem is still not resolved. 10% of my lots do not have an image.
  • nole52

    14 messages

    France

    My problem is solved now, i have no change my code, so i think it was the delcampe servers who had problems, but it work good for me now.

    I hope it will continue ^^
  • elenashvarts

    11 messages

    Kazakhstan

    Alas, my problem is not being solved. Images still load poorly.
  • @thomas
    Administrateur

    348 messages

    Belgique

    Hello elenashvarts,

    We do not encounter any problems loading the images to our knowledge. Some hosts limit the flow of servers they do not know. Can you provide us with the url of an image that has not been loaded?

    Best Regards,
    --
    Thomas
    Delcampe Team
  • nole52

    14 messages

    France

    It do not work anymore today... i dont know why again, but my pictures are not more uploaded.
  • Compte supprimé
    Compte supprimé

    0 message

    Belgique

    It do not work anymore today... i dont know why again, but my pictures are not more uploaded.
    • Posté le 7 déc. 2020 à 20:29
    • #1221101
    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)

Rejoignez la communauté des collectionneurs !

S'inscrire Se connecter