Giter Site home page Giter Site logo

imagesecure's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

imagesecure's Issues

Strange warning accussing any mimetype of not being an image.

The result is:

File: produto-01.jpeg is not an image. The file is removed!
Your images can be viewed here:

In the config file:

define("R_PATH", __DIR__);
define("F_PATH", R_PATH.'/assets/imagens/produtos');
define("H_FILE", true);

In the file imgupload.class:

    private function check_img_mime($tmpname)
    {
        $finfo       = finfo_open(FILEINFO_MIME_TYPE);
        $mtype       = finfo_file($finfo, $tmpname);
        $this->mtype = $mtype;

        if (strpos($mtype, '/assets/imagens/produtos/') === 0)
        {
            return true;
        }

        return false;

        finfo_close($finfo);
    }

The database:

imagem

Envio, Substituição e Actualização.zip

Possible missing fileinfo closing

In the method ImageUpload::check_img_mime() the closing of the fileinfo is after the return statements.
I believe it should be before the if statement of this method so that the fileinfo resource is effectively closed.

PHP errors

EDIT - solved the problem it was my fault. don't know how to delete the issue
I tried to test it on my server. Updated the configuration, created the database. This is the error log after attempting the first upload with a valid jpg:

[03-Jun-2020 15:36:17 UTC] PHP Warning: Creating default object from empty value in /home/dp3ndfkah1ii/public_html/ImageSecure/imgupload.class.php on line 44
[03-Jun-2020 15:36:17 UTC] PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/dp3ndfkah1ii/public_html/ImageSecure/imgupload.class.php:74
Stack trace:
#0 /home/dp3ndfkah1ii/public_html/ImageSecure/imgupload.class.php(234): ImageUpload->createTable()
#1 /home/dp3ndfkah1ii/public_html/ImageSecure/upload.php(7): ImageUpload->uploadImages(Array)
#2 {main}
thrown in /home/dp3ndfkah1ii/public_html/ImageSecure/imgupload.class.php on line 74

Need to resize image to fit in 350x350 box

Your library was easy to setup, though I did expect to see more on the read me, but what has me puzzled is how I take advantage of GD resizing. The images can be far too big from the user. I tried adding a GD function to resize but I am getting grief with that. Can you help or add a resize feature to the script?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.