github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

drogus / apache-upload-progress-module

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 130
    • 5
  • Source
  • Commits
  • Network (5)
  • Issues (4)
  • Downloads (1)
  • Wiki (2)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • master ✓
    • mutex-bug
  • Tags (1)
    • 0.1
Sending Request…
Click here to lend your support to: apache-upload-progress-module and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Upload progress module for apache — Read more

  cancel

http://drogomir.com/blog/2008/6/18/upload-progress-bar-with-mod_passenger-and-apache

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Allow reusing nodes of finished requests with same progress id 
mpokrywka (author)
Thu May 21 15:52:45 -0700 2009
commit  eb87ac0b871857202b058563f107c97dc13d68d8
tree    25597889c17bd25b7d8bd3ee2ad0d7302a3f2160
parent  5ba7d25027c1a987832b4f5f7e03a9a51d860d61
apache-upload-progress-module /
name age
history
message
file .gitignore Mon Jun 16 09:32:16 -0700 2008 Ignoring files from build [drogus]
file MIT-LICENSE Tue Jun 17 00:47:46 -0700 2008 Bla bla boring. License. [drogus]
file README Thu May 21 16:24:39 -0700 2009 Add newline before EOF to README [mpokrywka]
file mod_upload_progress.c Thu May 21 16:24:57 -0700 2009 Allow reusing nodes of finished requests with s... [mpokrywka]
README
Apache upload progress module. Works with mod_passenger (aka mod_rails). It's MIT license.

More info here: http://drogomir.com/blog/2008/6/18/upload-progress-bar-with-mod_passenger-and-apache

Tutorials showing how to use apache upload progress module:
http://www.drogomir.com/blog/2008/7/3/tweaking-rails-app-with-jquery-part-i (using jQuery)
http://www.railsillustrated.com/screencast-file-uploads-progress-in-rails-passenger.html (tutorial with screencast using 
prototype)

To install and activate module:
apxs2 -c -i -a mod_upload_progress.c

-c -> compile
-i -> install (copy upload_progress_module.so to apache lib folder)
-a -> activate (add LoadModule line to httpd.conf)

To compile it on mac you may need to:
sudo apxs -c -i -Wc,-arch -Wc,ppc7400 -Wl,-arch -Wl,ppc7400 -Wc,-arch -Wc,ppc64 -Wl,-arch -Wl,ppc64 -Wc,-arch -Wc,x86_64 
-Wl,-arch -Wl,x86_64 -Wc,-arch -Wc,i386 -Wl,-arch -Wl,i386 mod_upload_progress.c

Global config:
  you can define maximum size for shared memory (default is 50kB):
  UploadProgressSharedMemorySize 1024000 # sets memory size to 1MB

Note:
If you get "(12)Cannot allocate memory: Upload Progress cache: could not create shared memory segment Configuration 
Failed" 
error you should try to set memory size to smaller value.

Config for vhost:
<Location />
    # enable tracking uploads in /
    TrackUploads On
</Location>

<Location /progress>
    # enable upload progress reports in /progress
    ReportUploads On
</Location>

- JSON-P Support
You can also request progress updates by using JSON-P, if you are uploading the file from a different domain or 
subdomain than the web server that is handling your original request. Adding a "callback=yourCallbackFunction" parameter 
to your request to the progress server will activate this functionality. 

For example, a request like:
  http://uploads.yourdomain.com/progress?callback=jsonp123&X-Progress-ID=1234
  
Would return the JSON-P function: 
  jsonp123(new Object({ 'state' : 'uploading', 'received' : 35587, 'size' : 716595, 'speed' : 35587 }));
  
The normal JSON request:
  http://www.yourdomain.com/progress?X-Progress-ID=1234

Would return the JSON data: 
  new Object({ 'state' : 'uploading', 'received' : 35587, 'size' : 716595, 'speed' : 35587 })
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server