PHP Ajax File Browser 2.0 Beta
Update: Version 2.0.1 is available. Update post found here.
After the success of the PHP Ajax File Browser V1.1, I’ve re-invented the wheel with this new version. It’s not just a simple file browser anymore!
Here’s a list of features (some were already present in 1.1):
- Easy to use interface
- Allows public or restricted users to download anything you allow
- Share directories do not have to be beneath the site root
- Permissions: List, Download, Upload and Delete
- Administration Area for easy maintenance
- Simple self installation script
- Display extra links
- Logs everything to a Mysql database
- Reports on downloads, clickthrus, everything.
- Theme Support
- Block certain filetypes, filenames and directories
- Small page weight
Note: This is a beta. It will have bugs. Use at your own risk. I use it, so it can’t be that bad ;) But I do take no responsibility for loss of data etc etc. Also, I hope that you’re wise enough not to share the site directory of this application, or people could download your config files and get your passwords.
Installation
Just unzip to a directory somewhere on your webserver, and point to index.php. Installation will ask you for details from there. The application does not need to be at the root of your site (anymore).
So, where do you get it?
- View Demo Site
Download AFB 2.0 Beta (950kb)- Download AFB 2.0.1 (950kb)
Please report bugs and suggestions here. See below for a list of compatibilities.
| Op System | Webserver | PHP | Mysql | Result |
|---|---|---|---|---|
| Windows | Apache 2 | 5.1.4 | 5.0.22 | OK |
| Linux | Apache 2 | 4.4.3 | 4.1.21 | OK |
| Op System | Browser | Result |
|---|---|---|
| Windows | Firefox 1.5 | OK |
| Windows | Firefox 2 | OK |
| Windows | IE 6 | OK |
| Windows | IE 7 | OK |
If you have had success or failure with other combinations please let me know – particularly non Windows browsers.
Known issues
| Contributor | Problem | |
|---|---|---|
| Rutger | Files and directories with accented characters such as ‘é’ and other like ‘ø’ cause the application to hang when retrieving a directory listing. | Resolved in 2.0.1 |
Technorati: ajax, php, javascript, web 2.0
Hey, nice work. Just had a quick play with this now but it looks very nice. One quick suggestion tho… After you have uploaded it just displayes the upload screen again. Perhaps “Home” link somewhere obvious might be helpful? (I know you can click Cancel and get back there, but that just doesn’t feel right)
Great scripts. thanks for the update.
nice script, but directories with lots of files or subdirectories won’t show up in IE7. works fine in Firefox though.
same problem with IE6. the large directory has 153 subdirs in it. small dirs (with 10 subentries) are working perfectly.
this looks interesting – gonna try it out. thx, bro
works great, BUT there is ONE MAIN FEATURE MISSING and thats upload functions.
upload function shold be possible to enable/disable pr user pr directory (or to the same directories that the user have access to, with the same rights)
if a company wants to use this script as filestorage/fileshare, they cant have only 1 user supplying the files using FTP – they should all be able to upload files to share.
you shold also consider a “send” function, where the receiever getz a message where to get the file (www.site.com/112233.zip where the file location is hidden for the receiever).
the proggie is great as it, but but these ajusments (or the first anyways) i could sell this script to several of my customers, looking for safe and secure online storage and fileshareing.
:-)
thx
Minime,
There is upload functionality in this application (as stated in the 4th point of the feature list).
For an example of the Uploads, goto http://ajaxfb.jc21.com and observe the Upload share. On the right there is a green button with an arrow up. That is the upload button. Additionaly, for this site, public users don’t have permission to view the uploaded files. At this stage, all permissions can only be applied on a per Share basis, not different for every directory beneath a share.
I’ve chosen this approach so that you can add / remove files and directories on your server without having to change permissions on various directories or files every time you change the contents of a Share directory.
If you want allow uploads for a Share, in the Shares section of the Admin, click the blue Key icon next to the share. You only need to have the Upload permission ticked for the account to allow uploads without viewing the files.
If the account has list and upload permissions, then the account can upload files to any directory beneath the Share. But of course, they can also overwrite files this way.
If I’ve misunderstood your meaning here, let me know.
You suggestion about email notifications has crossed my mind, and will probably come into fruition.
Rutger,
It’s nice to see that MS has made IE7 a ‘critical’ update now. Much sarcasm intended there! Both versions of IE have the same javascript trouble though – which I can only assume is the problem.
I have tested the large directory listings (50+) in both IE6 and 7, on XP and Vista. There was no faults, here are some shots:
Long directories in IE6:
http://blog.jc21.com/wp-content/screenshots/ajaxfb2/t1.jpg
Long file list in IE6:
http://blog.jc21.com/wp-content/screenshots/ajaxfb2/t2.jpg
Long directories in IE7:
http://blog.jc21.com/wp-content/screenshots/ajaxfb2/t3.jpg
Long file list in IE7:
http://blog.jc21.com/wp-content/screenshots/ajaxfb2/t4.jpg
Can you tell me, where there any Javscript errors with the page? Are there any weird characters in your files or directories? (non ascii or another language, even ‘ and ” could be at fault – I admit I haven’t tested that)
It’s work perfectly.. my personal opinion: its great!
but i have one suggestion: what if for registered users and this have all privileges on a particular folder has a “create new folder” as a subfolder with the same primary folder permission aswell?
it would be nice right?
greetings!
You may have confused me. So you want to be able to Create directories?
Sure sounds good. Currently you can’t delete directories… even though in the admin somewhere it says you can… The trivials of beta software!
Internet Explorer doesn’t report any Javascript errors.
Apart from normal letters, digits and spaces, the following special chars are used: -’,.&[]()øé
I found out, the problems are the é and the ø chars. In PHP, I would use the htmlentities function, but since this is JavaScript and I know nearly nothing about JavaScript, I don’t know how to solve this problem.
Thanks for your help.
Hi, I installed this, but it seems like the .css isn’t working or something. I’m using Firefox 2, and I also tried it in IE 6. Am I missing something?
Here’s where i installed it.
http://www.vrdt.net/afb%5F2%2D0beta/
guest as the username and password.
Thanks…
Hi jamie,
This is a great product!! Thank you!
I have three questions:
1. Is there a way to increase the 7MB limit for the file uploads?
2. How can we enable file uploading to anonymous users too?
3. As I saw, there are no language files. Is there an easy way to translate ASB into another language(Are phrases kept in the same file)?
Victor,
The css file on your site is working fine. Did you install it to one directory and then move it? At a guess, the config file is not correct (includes/config.inc.php).
On line 8 there is a BASEURL global definition. I’m guessing it defined as ‘/’ at the moment, when it should be ‘/afb%5F2%2D0beta/’ for your site.
The Base URL specifies where to find the CSS and Javascript. It is relative to the Domain name (www.vrdt.net) and when the application is placed in a sub directory it should be specified in the config file.
Alternatively, you could delete config.inc.php and install again, it will not delete any existing tables or entries in the database if they already exist.
Ismet,
Thanks for your feedback. Here are some answers:
1. Yes. To increase the upload limit for your site, depending on your hosting, you need to edit php.ini, add a php.ini to the application root, add or edit a .htaccess file in your application root. If you’re hosting yourself, just edit the php.ini. Look for ‘post_max_size’ and ‘upload_max_filesize’. They can be set to the same. The lesser value of the two is used as the maximum for the upload.
2. The enable uploading for anonymous users: When viewing the Shares tab in the Admin, click on the Key icon to the right. The the third column of checkboxes for the accounts you want uploads to apply. In this case, anonymous account. Here’s a screenshot:
http://blog.jc21.com/wp-content/screenshots/ajaxfb2/ulperms.jpg
3. Sorry, no language files at this stage. Probably should look into it though.
Hey jc,
I reinstalled it 3 times without moving it, all in different directories, but got the same results as before. I’m not sure why the install script didn’t create my config file with the right settings of the BASEURL, but changing the created config file fixed this.
What I think would be really cool is if you could incorporate ajax to see a thumbnail version of images, or listen to an mp3 on clicking. I guess previewing it within the browser before downloading.
Anyway, I think it’s an awesome app! Good work… I’ll be looking forward for any updates.
Thanks…
Is it possible to create “FOLDERS / DIRECTORIES” from inside the application, instead of creating them manually?
Victor, the application determines the baseurl from the document root and http host variables. Maybe they are reporting incorrect values. But at least you’ve solved the problem!
Alex, currently it’s not possible. It’s main function is a file browser at this stage. Perhaps in later versions.
Looks like it would fit my needs, but i get some include php error when i try to download the package (afb_2-0beta.zip) from your website :( any change it’ll be fixed ? thanks
Whoops, my bad. It’s fixed now.
Maybe i don’t understand the idea of the filebrowser. But there’s a fact which is confusing me.
If i create an extra useraccount with the rights to list and to download (no admin rights) for an special share and i login with this user i can change the settings of the administrator and create new shares as well?
But the user should only be able to login and download in my view, nothing else?
Bjorn, thanks for pointing this out. This is a major bug, and although the extra user is not an admin, if they login and view admin.php, or login via admin.php then they are granted access.
I will get on top of this asap and update the version.
file link doesn’t work still:
Invalid Request
afb_2-0-1.zip
Array
(
[0] => files
[1] => afb_2-0-1.zip
)
files/afb_2-0-1.zip
Invalid Request
afb_2-0-1.zip
Array
(
[0] => files
[1] => afb_2-0-1.zip
)
files/afb_2-0-1.zip
Thats what I get when I try to download the file.
Also the text on this page to enter in the blanks to send this message is WHITE, thats crazy hard to see.
It’s murphy’s law. Works now
can someone tell me how to make it so that the imgs wont show up indcating if its a zip file and also how to make the font blue and how to remove the size of the files from showing up
It’s not something easily possible with the app, as I don’t see why anyone would want to do that.
First of all, it looks like a wonderful app. Well, I know this isn’t some troubleshooting forum but I don’t know where else to ask. I’m getting an internal server error and I know it’s due to the .htaccess file. Here’s a link to my servers answer for when this happens:
http://help.godaddy.com/article.php?article_id=1655&topic_id=&&
I’ve done what they said and made sure the permissions were correct as well as transfered the file in ASCII mode but still an error. Does anyone have an answer for me?
Hi Mike, I’ve covered this problem in the comments of the latest AFB post. You can jump straight to the solution here: http://blog.jc21.com/2006-11-13/php-ajax-file-browser-201/#comment-96
Thank you for the quick reply that’s excellent.
Hi This is a great product, but I think if you could add the forgot password feature that would be great
[...] New Version: Ajax File Browser 2.0 Beta, this version is no longer supported. [...]
Thanks for sharing
Hi This is a great but when a try to download files is say error 404.
Can you help mu to download please.
Version 2 of this is no longer available. However version 3 is available from http://sourceforge.net/project/showfiles.php?group_id=193937
Hey do you know any ajax sites such as palary. could you send me some links if you have enough time. my email is waleed1992@hotmail.co.uk.