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
written by Jason October 27th, 2006 at 18:18 | #1
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)
written by Hristo October 31st, 2006 at 10:10 | #2
Great scripts. thanks for the update.
written by Rutger November 2nd, 2006 at 00:43 | #3
nice script, but directories with lots of files or subdirectories won’t show up in IE7. works fine in Firefox though.
written by Rutger November 2nd, 2006 at 00:52 | #4
same problem with IE6. the large directory has 153 subdirs in it. small dirs (with 10 subentries) are working perfectly.
written by Minime November 2nd, 2006 at 06:07 | #5
this looks interesting – gonna try it out. thx, bro
written by Minime November 2nd, 2006 at 06:35 | #6
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
written by jc November 2nd, 2006 at 10:07 | #7
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.
written by jc November 2nd, 2006 at 10:27 | #8
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)
written by Gascan November 3rd, 2006 at 05:46 | #9
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!
written by jc November 3rd, 2006 at 09:20 | #10
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!
written by Rutger November 3rd, 2006 at 09:22 | #11
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.
written by Victor November 4th, 2006 at 06:37 | #12
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…
written by ismet November 5th, 2006 at 20:55 | #13
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)?
written by jc November 6th, 2006 at 09:15 | #14
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.
written by jc November 6th, 2006 at 09:30 | #15
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.
written by Victor November 7th, 2006 at 00:11 | #16
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…
written by Alex November 7th, 2006 at 03:49 | #17
Is it possible to create “FOLDERS / DIRECTORIES” from inside the application, instead of creating them manually?
written by jc November 7th, 2006 at 09:13 | #18
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.
written by benjamin November 8th, 2006 at 22:05 | #19
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
written by jc November 9th, 2006 at 09:18 | #20
Whoops, my bad. It’s fixed now.
written by Björn November 10th, 2006 at 22:06 | #21
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?
written by jc November 13th, 2006 at 09:23 | #22
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.
written by phil November 13th, 2006 at 20:03 | #23
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
written by digerati November 14th, 2006 at 03:37 | #24
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.
written by jc November 14th, 2006 at 09:15 | #25
It’s murphy’s law. Works now
written by Warrior December 3rd, 2006 at 06:38 | #26
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
written by jc December 4th, 2006 at 09:55 | #27
It’s not something easily possible with the app, as I don’t see why anyone would want to do that.
written by Mike December 13th, 2006 at 13:45 | #28
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?
written by jc December 13th, 2006 at 14:00 | #29
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
written by Mike December 13th, 2006 at 14:07 | #30
Thank you for the quick reply that’s excellent.
written by irfan February 13th, 2007 at 21:59 | #31
Hi This is a great product, but I think if you could add the forgot password feature that would be great
written by Doodee February 3rd, 2008 at 06:57 | #32
Thanks for sharing
written by dj)q March 3rd, 2008 at 00:25 | #33
Hi This is a great but when a try to download files is say error 404.
Can you help mu to download please.
written by jc March 4th, 2008 at 09:42 | #34
Version 2 of this is no longer available. However version 3 is available from http://sourceforge.net/project/showfiles.php?group_id=193937
written by Waleed September 23rd, 2008 at 20:02 | #35
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.