Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2011
    Posts
    103

    File Uploader in PHP

    Hey, I'm on the search for a good customizable file upload script in php.

    Putting together a basic one is easy enough, I'm more after a solid, and more importantly secure file script with relevant validation. All suggestions greatly welcomed.

  2. #2
    Try phpfileuploader.com

  3. #3
    Join Date
    Apr 2011
    Posts
    103
    Cheers, maybe I should have mentioned free as well.

    For what it's worth a nice loader bar would be a big bonus.

  4. #4
    you should try Kleeja

  5. #5
    Join Date
    Apr 2011
    Posts
    103
    Thanks - Kleeja looks very comprehensive - a little too comprehensive for what I'm after. But Thanks anyway

  6. #6
    Join Date
    Feb 2011
    Posts
    129
    Take a look at:

    http://code.google.com/p/swfupload/

    It is a relatively old library but still does a very good job.
    It has a nice PHP example included in the archive.

    Another one:

    http://www.uploadify.com/documentati...ing-uploadify/
    Last edited by XViD; 01-23-2014 at 08:46 AM.

  7. #7
    Join Date
    Apr 2011
    Posts
    103
    Any more suggestions?

  8. #8

    star gate

    Why dont you try uber uploader it has upload progress too without using swf but a bit of perl

  9. #9
    Join Date
    Nov 2011
    Location
    High Wycombe, UK
    Posts
    13
    There's a reasonable tutorial on how to roll your own here:

    http://www.sanwebe.com/2012/05/ajax-...jquery-and-php

  10. #10
    Join Date
    Feb 2012
    Posts
    238
    @microscan5ep the tutorial is really simple to be followed for file uploading/ ajax and jQuery.
    WEBUZO - Single User Control Panel for your VPS/Cloud/Server (CentOS/Ubuntu)
    Install NGINX, Apache, MySQL, LAMP, LEMP, PHP, Java and 310+ popular scripts by a CLICK
    Email Server, Database Management, Domain Management, FTP Management, CSF, CRON

  11. #11

    File Uploader in PHP

    Hi,
    I use this code for symfony2 project, it can help you

    PHP Code:
    /**
         * @ORM\Column(type="string", length=255, nullable=true)
         */
        
    protected $path;
        
        
    /**
         * @Assert\File(maxSize="900000", mimeTypes={"image/bmp", "image/gif", "image/jpeg", "image/jpg", "image/png"})
         */
        
    private $file;

        public function 
    getAbsolutePath()
        {
            return 
    null === $this->path
                
    null
                
    $this->getUploadRootDir().'/'.$this->path;
        }

        public function 
    getWebPath()
        {
            return 
    null === $this->path
                
    null
                
    $this->getUploadDir().'/'.$this->path;
        }

        protected function 
    getUploadRootDir()
        {
            return 
    __DIR__.'/../../../../web/'.$this->getUploadDir();
        }

        protected function 
    getUploadDir()
        {
            return 
    'uploads';
        }

        
    /**
         * Sets file.
         *
         * @param UploadedFile $file
         */
        
    public function setFile(UploadedFile $file null)
        {
            
    $this->file $file;
        }

        
    /**
         * Get file.
         *
         * @return UploadedFile
         */
        
    public function getFile()
        {
            return 
    $this->file;
        }
        
        public function 
    upload()
        {
            if (
    null === $this->getFile()) {
                return;
            }
            
            
    //$this->getFile()->move($this->getUploadRootDir(),$this->getFile()->getClientOriginalName());
            
    $this->getFile()->move($this->getUploadRootDir(),'img-'.$this->cne.'.jpg');

            
    //$this->path = $this->getFile()->getClientOriginalName();
            
    $this->path 'img-'.$this->cne.'.jpg';

            
    $this->file null;
        } 

  12. #12
    Join Date
    Mar 2005
    Location
    Athens, Greece
    Posts
    1,528
    I use Verot's class.upload.php ! EXCELLENT !!!!!!!!
    Antonis Adamakos @ FuzzFree :: Fully Managed Web Hosting, Development, Online Marketing

Similar Threads

  1. PHP File Uploader
    By dservers in forum Software & Scripts Offers
    Replies: 0
    Last Post: 04-12-2010, 09:03 PM
  2. PHP File uploader, More than 2 megs?
    By FSFOX in forum Web Design and Content
    Replies: 15
    Last Post: 05-31-2004, 02:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •