INTERIOR IMAGE NOT WORK


  • Global Moderator

    I tried to upload the sample image you have sent in the interior block of QloApps demo.
    The picture got uploaded successfully and also got displayed at the front.
    Please refer to these screenshots.
    https://prnt.sc/l3wuds
    https://prnt.sc/l3wupe



  • I don't know why! I save as picture as png type and upload ok. On my computer (localhost) i can't upload jpg file.
    Thanks for helping.


  • Global Moderator

    As we are checking, the jpg files are uploading properly and also displaying at the front.
    So there is no issue from our end.
    As you have installed QloApps on your localhost we cannot check the issue at your end also.
    So we recommend you to install QloApps on a public server and provide your FTP details on our ticket system. This way we will be able to check the issue at your end.
    Please raise a ticket here: https://webkul.uvdesk.com/en/customer/create-ticket/



  • Hi @lethach
    I tried for this, it works fine, but if your images are so big memory then you have to decrease memory to several hundred kb before updating



  • Need to edit file AdminAboutHotelBlockSettingController.php
    strtolower needed for preg match.

    Under function processSave()

        if (!(Tools::getValue("id_interior_image") && !$file['size'])) {
            if (!$file['size']) {
                $this->errors[] = Tools::displayError($this->l('Gallery Image Required.'));
            } elseif ($file['error']) {
                $this->errors[] = Tools::displayError($this->l('Cannot upload file.'));
            } elseif (!(preg_match('/\.(jpe?g|gif|png)$/', strtolower($file['name']))
                && ImageManager::isRealImage($file['tmp_name'], $file['type']))
            ) {
                $this->errors[] = Tools::displayError($this->l('Please upload image file.'));
            }


  • @untamed1 said in INTERIOR IMAGE NOT WORK:

    Need to edit file AdminAboutHotelBlockSettingController.php
    strtolower needed for preg match.

    Under function processSave()

        if (!(Tools::getValue("id_interior_image") && !$file['size'])) {
            if (!$file['size']) {
                $this->errors[] = Tools::displayError($this->l('Gallery Image Required.'));
            } elseif ($file['error']) {
                $this->errors[] = Tools::displayError($this->l('Cannot upload file.'));
            } elseif (!(preg_match('/\.(jpe?g|gif|png)$/', strtolower($file['name']))
                && ImageManager::isRealImage($file['tmp_name'], $file['type']))
            ) {
                $this->errors[] = Tools::displayError($this->l('Please upload image file.'));
            }
    

    Other option is to change preg_match string to '/.(jpe?g|gif|png)$/i'



  • Hi @Faiz ,
    I can not upload the file about more than 2.5 Mb. Beacause the clear image is very important for introduce my hotel, so i want to keep the original images? Is it possible with this size image or?

    Thank you


  • Global Moderator

    @untamed1 Thanks for bringing this into our notice. We really appreciate that.
    We have taken this issue in our top priorities and will resolve this soon.
    Kudos!!!



  • @faiz No problem, glad to help.


  • Global Moderator

    @duongledong4
    Please set max_upload_filesize and post_max_size values on your server to the value more than the size of image you want to upload.
    Please set 16M to both the variables once and then upload the image.


Log in to reply