Coder Social home page Coder Social logo

php-file-upload-class's People

Contributors

aivis avatar andrzej-orbitvu avatar shankka avatar sigsalerno avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-file-upload-class's Issues

is_writable returning NULL / false after set_destination

Firstly i would like to say good work, this is decent script.

I was getting:
Warning: mkdir(): File exists in <dir>\upload.php on line 573
when trying to use a pre-created directory, or uploading more than once to same directory after creation.

I searched the class and found set_destination() and sub-sequentially is_writable() was being called on a relative path and returning NULL, I had to change:

ln. 558

    protected function destination_exist() {
        return is_writable($this->destination);
    }

To this:

    protected function destination_exist() {
        return is_writable($this->root . $this->destination);
    }

To get it to check the directory correctly

save_file() error

full_path key not use $this->root.

Fix:

$this->file['full_path'] = $this->root . $this->destination . $this->filename;

Allowing all mime types

If i want to allow all the mime types, can i just don't put the line that checks the mime types?
Like this:

//set allowed mime types - delete this line for allow all mime types //$upload->set_allowed_mime_types(array('application/pdf'));

Or i need to allow a * in instead of puting the mime type?
Like this:
//set allowed mime types - puting a "*" instead of a mime type $upload->set_allowed_mime_types(array('application/ * '));

Thanks for the awesome upload class !

Multiple uploads on same page error

Notice: Constant ROOT already defined in C:\wamp\www\document-signature\libs\upload.php on line 137

Solution:
if (!defined('ROOT'))
define('ROOT', $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR);

problem with upload array of file

hi
i want upload array like this
`Array
(
[0] => Array
(
[name] => 7feb99f684d5d44eceb8084247188bc5.jpg
[type] => image/jpeg
[tmp_name] => C:\wamp64\tmp\php2506.tmp
[error] => 0
[size] => 276309
)

[1] => Array
    (
        [name] => 6ee8368da2517a4b9802506695231697.jpg
        [type] => image/jpeg
        [tmp_name] => C:\wamp64\tmp\php2507.tmp
        [error] => 0
        [size] => 268148
    )

)
`
what to do?

Uploaded file no extention

After the file uploaded, there is no extension.
So what's going with this file when user download this file?

upload two file in separate destination

i have an array
array 'first=> array name =>'a' ..... sec => array name =>'b''

i want use Upload class in another class and upload first to first/path and sec to sec/path
please help .how?
thanks

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.