Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Upload Status Bar  (Read 16920 times)

0 Members and 1 Guest are viewing this topic.

Zeitgeist

  • Coppermine regular visitor
  • **
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 71
Upload Status Bar
« on: April 19, 2006, 09:57:48 am »

When uploading photos the conventional way, through the web interface, there's no information on the progress of how the photos are being uploaded -- how far done you are, if you timed out, etc... I think this would be a beneficial feature because a lot of the time people have no idea its doing anything, especially computer "newbies."

I've had plenty of friends get discouraged when uploading to my website (and then just going and putting them on facebook, webshots, etc) because they have no idea what's going on. Again, I think this would be beneficial, helpful, and welcomed.
« Last Edit: April 19, 2006, 10:03:17 am by GauGau »
Logged
I love GauGau!

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload Status Bar
« Reply #1 on: April 19, 2006, 10:03:05 am »

that's just impossible - has been requested before. Using the http upload mechanisms of your browser means that you can't have a progress bar.
Logged

Zeitgeist

  • Coppermine regular visitor
  • **
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 71
Re: Upload Status Bar
« Reply #2 on: April 19, 2006, 11:49:18 am »

Uh. Why exactly did you delete my post showing you an example? It wasn't meant as an advertisement for software I don't even use, or have.
Logged
I love GauGau!

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload Status Bar
« Reply #3 on: April 19, 2006, 01:12:52 pm »

I haven't deleted a posting of yours as far as I can tell.
Logged

Zeitgeist

  • Coppermine regular visitor
  • **
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 71
Re: Upload Status Bar
« Reply #4 on: April 19, 2006, 07:23:11 pm »

Oh. Maybe it was my post that was edited or it just didn't post.

Did you see the example I posted? It was an additional mod for a phpBB photo album that had the ability. It used perl and displayed a progress bar on the status of the upload.

Anyway, places like WebShots have a pop-up that is displayed when photos are being uploaded, ie "your photo is being uploaded" and then disappears when the uploading is complete.

Logged
I love GauGau!

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Upload Status Bar
« Reply #5 on: May 11, 2006, 12:27:25 am »

Since someone else just asked about this in another thread and was pointed here, I just read this thread for the first time and thought I'd read a little about this.

This page has a pseudo-PHP progress bar, but it requires Perl to be installed on your server as well.  The page describes why, how it's done, and a demo: http://www.raditha.com/php/progress.php.

Needless to say, Coppermine won't be adding it to the core.  It does sound like a good plugin project though, with of course clear documentation saying you need Perl on your server to use it.

Oh, and here is another link with more info & links regarding such a progress bar: http://blog.joshuaeichorn.com/archives/2005/05/01/ajax-file-upload-progress/
« Last Edit: May 11, 2006, 12:34:04 am by Paver »
Logged

sharif_aly

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 36
Re: Upload Status Bar
« Reply #6 on: May 11, 2006, 12:49:52 am »

I think could be made with AJAX
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload Status Bar
« Reply #7 on: May 11, 2006, 08:48:46 am »

I don't think so. Ajax is yet another buzzword - it has been around all the time under other disguises. In fact it is JavaScript and CSS to change certain parts of a page (instead of loading the full page) based on information retrieved from the server, and this is why you can't use it: the server won't "tell" you about the progress of a file upload (at least not using methods that are available using PHP), so there will be no info the client can retrieve from the server and display accordingly. We understand how JavaScript works, we need a method to figure out what the server does (or rather: what the status of the communication between browser and server is).
Imo this could be circumvented by an ActiveX-Control for M$-Browsers, but then we'd be losing platform independence, and I doubt that there are dev team members who are willing to look into proprietary M$-stuff.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Upload Status Bar
« Reply #8 on: May 11, 2006, 09:42:33 am »

I had already developed a mod which uses MegaUpload (the link Paver referred to) on my local setup. It was working fine locally. But when i tried to upload it to live server...it didn't worked. I tried for few times and then gave up.

Maybe if i get time i will try once more to get it working on live server and post the mod here. But it uses PERL and not all will be benifitted. And also i won't be able to give support as i don't know perl.
Logged
Chief Geek at Ranium Systems

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Upload Status Bar
« Reply #9 on: May 11, 2006, 12:52:46 pm »

Here is the progress bar mod. Note that this is meant for only experienced users who know how web servers work. This mod is just an example to show that progress bar can be implemented. However 90% chances are that this mod won't work for you. In that case i won't be able to help since i myself don't know any perl. So please use this mod only if you know your way around. Normal users are NOT encouraged to use it.

Attached is the zip file. Keep megauploads folder in your server's cgi-bin directory. Replace upload.php and place pgbar.php in cpg root. Do take backups.

You will need to modify 3 things.

Edit upload.php and replace

Code: [Select]
$upload_cgi_path = '/cgi-bin/megauploads/upload.cgi';

with correct path as per your server.

Edit pgbar.php and replace

Code: [Select]
$link="/cgi-bin/megauploads/progress.cgi?iTotal=".$iTotal."&iRead=".$iRead."&iStatus=".$iStatus."&sessionid=".$sessionId."&dtnow=".$dtnow."&dtstart=".$dtstart;

with the correct path to the cgi directory on your server.

then edit megauploads/header.cgi and replace

Code: [Select]
$php_uploader="http://www.xyz.net/photos/upload.php";

with correct url to your upload.php script


Abbas
Logged
Chief Geek at Ranium Systems

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Upload Status Bar
« Reply #10 on: May 11, 2006, 04:06:45 pm »

Abbas: I'll look into it during the next week.  I know Perl pretty well, but I haven't looked at the Perl source yet to see if it seems familiar or not.

As for the Ajax solution, it may seem like an all-PHP solution, but I'm pretty sure it uses a modded PHP installation.  One of the first links it refers to is based on a patch to the PHP source that you compile then install.  Looking at the Ajax source, it looks like it refers to this "patched" PHP installation.
Logged

trippinsweet

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 27
Re: Upload Status Bar
« Reply #11 on: June 22, 2006, 06:00:20 am »

Paver, did you look into it?

I've been independently searching for a method to integrate a progress bar into coppermine and the megaupload tool seemed like the best best for it.

If you've checked it out and encountered any issues, I'd like to know.

--

Oh and on another note, I wouldn't recommend the Ajax solution. It requires a modified PHP install and one of the very first replies to the blogpost announcing it claims that it was submitted to PHP but found not to be threadsafe... imo handling threads correctly is far more important than a enabling progress bar via php.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Upload Status Bar
« Reply #12 on: June 22, 2006, 02:50:59 pm »

I have to stop giving time frames in my posts.  No, I haven't looked at it yet.  I don't mind the reminder - it's helpful so I know what I've forgotten to do.  I'll see what I can do.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Upload Status Bar
« Reply #13 on: August 23, 2006, 01:52:46 pm »

I have to dig that one out...

While browsing php.net I came across the 5.2 news and withing here I've read
Quote
- Added RFC1867 fileupload processing hook.

( http://cvs.php.net/viewcvs.cgi/php-src/NEWS?view=markup&pathrev=PHP_5_2 )

So it's probably soon possible to code such an upload progress bar as a plugin or mod without all the above mentioned downsides

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload Status Bar
« Reply #14 on: August 23, 2006, 07:57:47 pm »

Yes, I've read that announcement as well (has even made it into popular German pc magazine "c't"). Drawback: it will take a while untill PHP5.2 will become popular. When coding it into coppermine's core code, minimum requirements would have to be raised to PHP5.2 as a consequence. It will take years untill this will happen.  Workaround: code this as a plugin/mod for those who already have PHP5.2 or better.
Logged

sharif_aly

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 36
Re: Upload Status Bar
« Reply #15 on: December 28, 2007, 12:50:21 am »

I hope this can be done in plugins to make upload progress bar >> loading <<
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload Status Bar
« Reply #16 on: December 28, 2007, 10:37:35 am »

Locking.
Logged
Pages: [1]   Go Up
 

Page created in 0.042 seconds with 20 queries.