Git Product home page Git Product logo

php-safe-secure-image-upload's Introduction

PHP safe/secure image upload

PHP safe/secure image upload code snippet
Copyright 2021 Maxim Masiutin
[email protected]

This code saves an uploaded file under the original file name, as provided by the uploader. It does not use a hash as a destination filename or similar technique but preserves the file name instead.

If you manage to find vulnerabilities or weaknesses in this code, please send me a note. This code is just an example that illustrates the issues that may arise during PHP file upload. The code serves educational purposes and is not intended for direct use.

License

This program is free software; you can redistribute it and/or modify it under the terms of version 3 of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Usage

Go to the directory with the upload.php and index.html and run:

php -S 127.0.0.1:8080

Then open http://127.0.0.1:8080/ in your web browser.

php-safe-secure-image-upload's People

Contributors

maximmasiutin avatar

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.