This is a continuation of my AJAX Hello World series, in my earlier posts I covered sajax and JPSpan. In this article i’ll cover how to get a basic AJAX… [Continue Reading]
If your coming here from the php|arch webcast, welcome, and from anywhere else too. It looks like the presentation server had some sort of outage, during the question and answer… [Continue Reading]
A couple days ago I found an interesting ruby on rails project. It uses AJAX to update a progress bar as the file uploads. The trick is a patch to rails for getting upload status and doing the upload in an iframe so that the main page is still active.
So to replicate this I just had to find a patch that provides upload status in PHP and then implment my little iframe upload widget.
I found the PHP with a little work from google: Upload Progress Meter
First you need to install the patch and the extension, the included instructions are easy to follow. The only problem I found is that: upload_progress_meter.store_method = “file” had to be set in my php.ini before thing would work.
I also ran into a JPSpan problem, if your having network problems the status call might take longer then 1 second, and you’ll get Call in Progres error alert. This can be fixed with the current version of JPSpan but i’d like to see some api added to help. The proxied objects need some type of inProgress call to make this an easy fix.
Here is the demo you’ve been waiting for, for most connections a 250k file will be enough to see something besides connecting and complete.
A walkthrough of the code and download links are included in the rest of the post.
Also if anyone has the time and skills to review the php patch and see what it would take to get integrated, please let me know. I haven’t heard from its author so I don’t know why its not integrated but it just seems crazy to have a 3K patch that is this useful only available to those who are willing to patch.