• Stars
    star
    152
  • Rank 244,685 (Top 5 %)
  • Language
    C
  • License
    MIT License
  • Created over 16 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Upload progress module for apache
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)

On Macs:
  apxs -c -i -a -Wc,"-arch i386 -arch x86_64" -Wl,"-arch i386 -arch x86_64" mod_upload_progress.c

  Missing compiler directory:

    If you get this error:
      /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.11.xctoolchain/usr/bin/cc: No such file or directory
    create a symlink before compiling:
      sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.11.xctoolchain

  OS X 10.11 El Capitan with System Integrity Protection (SIP):
    
    You will get this error when installing:
      install: /usr/libexec/apache2/mod_upload_progress.so: Operation not permitted
    You can work around that by creating a custom directory and copy the file over after compiling:
      mkdir /usr/local/libexec/apache2
      cp .libs/mod_upload_progress.so /usr/local/libexec/apache2/mod_upload_progress.so
    You can then manually reference this location in your httpd.conf file:
      LoadModule upload_progress_module /usr/local/libexec/apache2/mod_upload_progress.so

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 (or global locations):
  <Location />
      # enable tracking uploads in /
      TrackUploads On
  </Location>

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

- Valid progress ID
  Progress IDs are now validated: length must be within 8..128 characters,
  identifier may contain alphanumeric characters and also -_:./!{}

- 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=12345678

  Would return the JSON-P function:
    jsonp123({ "state" : "uploading", "received" : 35587, "size" : 716595, "speed" : 35587, "started_at": 1296568823, "uuid" : "12345678" });

  The normal JSON request:
    http://www.yourdomain.com/progress?X-Progress-ID=12345678

  Would return the JSON data:
    { "state" : "uploading", "received" : 35587, "size" : 716595, "speed" : 35587, "started_at": 1296568823, "uuid" : "12345678" }

- Valid JSON-P callbacks
  Callback names are now validated: length must be within 1..64 characters
  identifier may contain alphanumeric characters and also ._$

More Repositories

1

jquery-upload-progress

Upload progress bar working with apache, nginx and lighttpd upload progress modules
JavaScript
243
star
2

bulk_api

Ruby
151
star
3

rails-parts

merb-parts ported to rails 3
Ruby
26
star
4

prototype-upload-progress

Upload progress bar working with apache, nginx and lighttpd upload progress modules
21
star
5

crows

A distributed load testing tool written in Rust running WASM compiled scenarios
Rust
19
star
6

blog_engine

Mountable engine example, almost nothing here yet ;-)
Ruby
17
star
7

ember-aria

Set of primitives to make developing accessible websites easier
JavaScript
16
star
8

bulk_data_source

JavaScript
15
star
9

mugshots

Simple app for my jQuery + Rails tutorial
Ruby
11
star
10

phonegap-oauth

JavaScript
10
star
11

ifirma-api

Ruby API bindings for ifirma.pl
Ruby
6
star
12

culerity-javascript-example

Culerity unobtrusive javascript example
Ruby
6
star
13

todo-backend

Rust
5
star
14

lightbox-fu

Really simple lightbox.
JavaScript
4
star
15

Todos-Rails-Example

JavaScript
3
star
16

ember-cli-inline-images

JavaScript
2
star
17

rails_helpers_fix

Quick fix that changes rails 3.0.0 to include all plugins' helpers
Ruby
2
star
18

blog-api-example

Example application with API kept in engine for one of my presentations.
Ruby
2
star
19

tagtical

Weighted Tagging Support for Rails
Ruby
2
star
20

last-commit-sha-buildpack

Shell
2
star
21

jetty-client-test

Java
1
star
22

wrug-celerity-example

Example app for my celerity presentation at wrug.eu
Ruby
1
star
23

presentation-slides

Slides for my presentations
1
star
24

github-apps-test

1
star
25

phoegap-strobe-oauth-ios

JavaScript
1
star
26

dotter

1
star
27

wrug-we-buried-fixtures-too-soon

Presentation from WRUG meeting (in Polish)
1
star
28

thousands-dots

JavaScript
1
star
29

simd-json-ruby

An experiment in creating a Ruby wrapper over simd-json library in Rust
Rust
1
star
30

blogx

Blog engine for Rails 3.1.
Ruby
1
star
31

ActiveTile

Extension to google maps that allows to add custom tiles with activity layer on top of it
JavaScript
1
star