imdb
screenshot

What is It?

This is a simple php script which allow you to upload and download files. There isn't any complex user management because it aims more for private file repository use.

It as direct file deletion using AJAX, instant table sort using a self modified version of sorttable.js and finally upload file progressbar using a cgi(perl) script.

If you want to know more about those technologies, go to more information section.

Features

  • Easy upload form
  • Allow to define which kind of file can be uploaded
  • Limit max file size
  • On page table sort (by name, date, type, size)
  • Direct deletion using AJAX
  • View file by clicking on them
  • Direct download by clicking on the download arrow
  • Protect and hide upload or/and delete functions only for admin
  • Logging upload/delete actions (time ip action)
  • Upload progress bar (disable by default)

Online Demo

Visit the online demo. Delete the deleteme.txt file or upload some meaningless files.

 

How to Install

Download w2box 4.0.0Beta5 (~46 KiB)

If you prefer not to use the beta, use w2box 3.3.2 instead.

 

License

This script is licensed under a Creative Commons License. It allows you to use and modify the script for noncommercial purposes. For commercial use, contact the labs!

 

Changelog[feed]

  • 4.0.0Beta5 Redirection and security fixes and more languages
  • 4.0.0Beta4 More folders bug fixes
  • 4.0.0Beta3 Folders bug fixes
  • 4.0.0Beta2 Safari fix
  • 4.0.0Beta Folder and multi language support
  • 3.3.2 Security fix
  • 3.3.1 Extention fix
  • 3.3 Authentification fix for some host and cgi redirection fix
  • 3.2 Fixed chmod issues, simplified directory structure and files
  • 3.1.3 Improved upload.cgi error and aborted upload cleanup, various fixes
  • 3.1 Added icons, date and auto-deleting
  • 3.0.3 Fixed file perms bug
  • 3.0.2 Fixed direct linking
  • 3.0.1 Fixed minor strange bug
  • 3.0 Finally a upload progress bar (under windows&linux) without php patching
  • 2.5.1 Fixed hide upload form
  • 2.5 Easier configuration, localisation & many fixes
  • 2.3 Possibilty to log upload and delete actions
  • 2.2 Deletion is working for international charsets
  • 2.1 Fixed some weird FF bug and allow client without javascript to upload
  • 2.0.1 Fixed a javascript bug for Opera
  • 2.0 Added admin authorization to protect/hide upload or/and delete
  • 1.6 Fixed issues with filename characters
  • 1.5.2 Fixed some css bugs
  • 1.5 Better error management, removed sajax using prototype.js now.
  • 1.0 Initial Release
 

FAQ

I've just unpacked w2box and got an error 500 ?

It seems that some server configuration doesn't support the .htaccess file. Just delete that file.

How to enable the upload progress bar ?

Enabling the progress bar can be a bit trickier. That's why it is disabled by default. Before enable it, make sure the script works without it.

If it's working, make sure the first line of upload.cgi is right according to where you have perl (on standard unix config, you probably don't need to do anything) and the file will probably require to be chmod 755 in order to be executed. You can check if the perl script is working by opening it. You should get "CGI Working" like by example on my server.

If you don't get an error, the default temporary dir is working. By default, it is set to "tmp" in the same folder as w2box. However, you might prefer to change it to a full path like /tmp or ~/tmp. Make sure to change it in both upload.cgi and config.php.

Finally, you can turn the variable upload_progressbar to true in config.php and hopefully it will works.

How could I be aware of update to w2box ?

The easiest is to subscribe to w2box changelog feed.

How could I password protect entriely my w2box ?

The best was to protect the whole box and your files is to use apache http access protection. You can use this utility to make the required files.

How to increase the maximum file size limit ?

By default the script is set to a maximum file size of 50MiB and use a .htaccess file to try to configure php to allow such maximum file size. However, if it doesn't work you should modify the post_max_size & upload_max_filesize variables in php.ini which is the php configuration file. It is related to your webhost, therefore you should check with them if you are allowed to change them and how to do it.

Why files aren't complete when using the downloading feature ?

There is an inherent problem with readfile() in PHP 5.0.4. Upgrade to the last version of php.

Why am I getting error 404 when I am accessing folders ?

Folders are still in beta and require the .htaccess file to work properly (which might be hidden depending your OS). Be sure that the .htaccess file is in the w2box folder and enable .htaccess support and mod_rewrite in your httpd.conf of the apache webserver.

Any Questions ?

If you have any idea, suggestion or bug don't hesitate to contact the labs

 

More Information

Ajax: http://www.adaptivepath.com/publications/essays/archives/000385.php
Simple Ajax Toolkit for PHP : http://www.modernmethod.com/sajax/
Make all your tables sortable : http://www.kryogenix.org/code/browser/sorttable/
Upload Progress Meter for PHP : http://pdoru.from.ro/
Prototype.js just for AJAX : http://alexander.kirk.at/2005/10/05/prototypejs-just-for-ajax/
.htaccess/.htpasswd to lock your whole w2box : http://www.webmaster-toolkit.com/htaccess-generator.shtml
Asynchronous file upload with AJAX progress bar : http://tomas.epineer.se/archives/3
Mega Upload php/perl progress bar : http://www.raditha.com/php/progress.php
Directory Listing Php script : http://evoluted.net/archives/2005/08/directory_listi_2.php
fileNice - free php file browser : http://filenice.com/

 

Want more ?

Go to the labs!