tag:railsillustrated.com,2009:/screencast-file-uploads-progress-in-rails-passenger/feed Comments on „Screencast : How to Create a File Upload Progress Bar in Rails, Passenger, Prototype and Low Pro“ Rails Ill. railsillustrated.com/screencast-file-uploads-progress-in-rails-passenger.html 2010-03-04T13:40:11Z tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1231491634 2009-01-09T09:00:34Z Roy van der Meij said on January 9 2009 Nice solution. Really clean and simple, I like it! Roy van der Meij tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1231618713 2009-01-10T20:18:33Z Jeff said on January 10 2009 I am curious as to how you slowed down the bandwidth on your local machine to simulate the progress? Cool solution! Jeff tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1231687352 2009-01-11T15:22:32Z Erik said on January 11 2009 Jeff - To slow down your bandwidth use these instructions here: [How to Simulate a Web Experience in Development](http://www.railsillustrated.com/simulating-a-web-experience.html). Basically you use `ipfw` to set a bandwidth limit to port 80. Erik http://railsillustrated.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1231967063 2009-01-14T21:04:23Z Daniel said on January 14 2009 Wow, really cool! I just did a little hack job of a write up for multiple file uploads similar to Gmail's attachment feature. Check it out here: <http://prowestech.com/posts/4> When I get time, maybe I'll apply your methodology to my tutorial and see where it goes. Daniel http://prowestech.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1232989598 2009-01-26T17:06:38Z wout said on January 26 2009 Great screencast, thanx for that. I implemented it into a project and it works very smooth, even with multiple files. In IE7 (and IE6 too, but I'm not taking that beast into account) a new window opens when I start uploading. I guess IE doesn't get the concept op the dynamically created iframe? Any suggestions on how to fix that? wout http://wonderingboys.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1233079070 2009-01-27T17:57:50Z Erik said on January 27 2009 wout - It seems like the `iframe` was not correctly inserted in IE. To get it to work in IE insert the `iframe` with: $$("body").first().insert({bottom: "<iframe name='progressFrame' style='display:none; width:0; height:0; position: absolute; top:30000px;'></iframe>"}); Erik http://railsillustrated.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1233427592 2009-01-31T18:46:32Z wout said on January 31 2009 Wow, thanx. Escaping it does the job indeed. In the meanwhile I noticed something else though. If a visitor stops in the middle of an upload process, the apache progress module stops working. In some way this keeps paperclip from working too. The only way to get it working again is restarting apache. At first I thought it was a local problem, but when I deployed the app on my mediatemple DV, the same thing happened. Later I tried it on the osx server of a client but without success. I'll notify drogus about it. wout http://wonderingboys.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1233783106 2009-02-04T21:31:46Z erik said on February 4 2009 wout - That sounds a little odd. Are you submitting a single form with multiple file fields? You will want to have a separated submit with a separate and distinct uid for each submit. Another thing to consider to try to debug the situation if you haven't already tried this is to use the [Firefox Firebug extension](http://getfirebug.com/) to watch the requests and responses from the apache module. erik http://railsillustrated.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1234830099 2009-02-17T00:21:39Z raphael_999 said on February 17 2009 for an odd reason i can't get the script to move on to the show action after the upload. It uploads, then the bar reaches 100% then it gets stuck there. The requests keeps on going with the state done. The show action is displayed in the iframe. I must be missing something huge. I hacked my way around it in the upload.js doing : <pre><code>if(upload.state == 'uploading'){ upload.percent = Math.floor((upload.received / upload.size) * 100); $('bar').setStyle({width: upload.percent + "%"}); $('bar').update(upload.percent + "%"); } else if (upload.state == 'done'){ redirect somewhere } </code></pre> but i'm sure there's a cleaner way to do this. plz keep in mind i'm quite noob with this rails thing. maybe i'm just asking too much to the rails magic ! :) raphael_999 tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1234857818 2009-02-17T08:03:38Z Amit Yadav said on February 17 2009 hi, The "/progress" url is showing me a 404 error. Can anybody help me on that. Amit Yadav http://amityadav.name tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1235472912 2009-02-24T10:55:12Z Roger S said on February 24 2009 Anyone get this working with nginx?? Roger S tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1235528399 2009-02-25T02:19:59Z erik said on February 25 2009 **Roger S**: Are you using this module: [http://wiki.codemongers.com/NginxHttpUploadProgressModule](http://wiki.codemongers.com/NginxHttpUploadProgressModule). Is the JSON returned by the /progress URL in the same format? It might be slightly different. If it is, you might need to modify the Javascript that calculates the progress bar size. **Amit**: Are you sure that Apache is configured correctly? You might want to double check the vhost config file and make sure that the Apache Module is activated in the `httpd.conf` file. **raphael_999**: The Javascript should be loaded by the show action inside the `iframe`. The Javascript detects if the content of the `iframe` has been reloaded and then forces the parent to reload. This should cause the whole page to reload when the upload is complete, erik tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1235699394 2009-02-27T01:49:54Z nap said on February 27 2009 Hmm seems like this won't work with a standard new/edit form, since it's forcing a hard redirect to the submit action URL in the onLoad. Any ideas for making it play nice with edit forms and display errors inline? In other words, instead of redisplaying the form data at /images/new (if there was a full form for data entry) it would redirect to /images and display the listing. nap tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1236070241 2009-03-03T08:50:41Z Alexwebmaster said on March 3 2009 Hello webmaster I would like to share with you a link to your site write me here preonrelt@mail.ru Alexwebmaster tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1237306675 2009-03-17T16:17:55Z Jonathan said on March 17 2009 I'm receiving the "no suitable image" error even after following your instructions on compiling the apache upload progress module for my mac os x intel arch. [http://gist.github.com/80611](http://gist.github.com/80611) After closely examining your screencast, the only difference I see in my results and yours is this line: <pre> warning: no debug symbols in executable (-arch x86_64)</pre> but its only a warning so I don't see how that could the culprit. I'm using darwin ports apache: apache2 @2.2.11_0+darwin_9 (active) Any suggestions? Jonathan http://blog.jonathanrwallace.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1237313198 2009-03-17T18:06:38Z Jonathan said on March 17 2009 Did my previous comment get eaten? I followe your installation steps on mac os x intel arch and am still having problems. [http://gist.github.com/80611](http://gist.github.com/80611) Any suggestions? Jonathan http://blog.jonathanrwallace.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1237344034 2009-03-18T02:40:34Z Erik said on March 18 2009 **Jonathan** - it seems from your gist that it is still compiling a mach architecture version of `mod_upload_progress.so`. What version of gcc do you have installed? On my machine I have the version that was installed with XCode. Also are you using Tiger or Leopard? Erik http://railsillustrated.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1237483851 2009-03-19T17:30:51Z Jonathan said on March 19 2009 my gcc version is: `i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)` and i'm on leopard: `ProductName: Mac OS X ProductVersion: 10.5.6 BuildVersion: 9G55` Jonathan http://blog.jonathanrwallace.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1238087741 2009-03-26T17:15:41Z Jose said on March 26 2009 Hi! Great and easy-to-follow video. I installed FireBug and when I load the page I get the following error: <b>Event.addBehavior is not a function</b> Of course the whole system does not work at all, it does not even display the hidden div when submit is clicked. Is there any extra javascript that needs to be included? Other suggestions to try and fix this? Thank you. Jose tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1238089097 2009-03-26T17:38:17Z Jose said on March 26 2009 I reply to myself. "lowpro.js" must be included as well. Sorry for the post. Jose tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1238607291 2009-04-01T17:34:51Z Jonathan said on April 1 2009 Over at [Drogomir's blog](http://drogomir.com/blog/2008/6/18/upload-progress-bar-with-mod_passenger-and-apache) in the comments, I found a apxs command that worked for compiling the apache upload progress module. <code> 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 </code> Thanks for the tutorial! Jonathan http://blog.jonathanrwallace.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1239770179 2009-04-15T04:36:19Z Grant said on April 15 2009 Hmm.... I'm having all sorts of bother with this. Something is borked with my setup. Upload works fine (ie 100% uploaded immediately) without throttling, but no progress is shown {as expected}. If I throttle using your instructions (ipfw), then upload takes forever {also expected?}. I confirm that I have had success twice {with firefox}, but now the progress bar updates in one jump after 15+ seconds. Same behavior with firefox 3.0.8 + Safari Running OS 10.5.6/Apache2.2.9 with: Passenger 2.1.3. Safari 3.2.1, latest version of 'upload progress', Passenger Pref pane 1.2 I've tried Rails 2.1.0, and 2.1.2, no difference... I've upgraded to Prototype 1.6.0.3 (from 1.6.0.1) no difference Qs: - What version of Safari are you using? - What version of Passenger are you using? - Does the <directory> directive inside the VirtualHost require a Capital 'D' ? - Have you got it to work with Passenger.pref pane? Maybe important: ruby+gem+rails installed using MacPorts (ie in /opt/local/....) Suggestions, anyone? Thank you. Grant tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1247637810 2009-07-15T06:03:30Z Leumas said on July 15 2009 Good work Eric!!! Two Things: 1) Is there a method to see if the upload_module is properly installed / configuration is correct. 2) I am not sure if I connected the javascript libraries correctly... connected prototype and lowpro in the right way. I downloaded lowpro.js and prototype.js, and included both of them in the layout declaring prototype first. best, Leumas Leumas http://laowise.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1247639901 2009-07-15T06:38:21Z Leumas said on July 15 2009 Forget to ask a question regarding my last post. The question for number 2) is is there a method to check if they javascript files are installed correctly? Leuams Leumas http://beginnercasts.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1248964106 2009-07-30T14:28:26Z iuser59 said on July 30 2009 This is what I have http://pastie.org/private/x4yfvdc9fpksi4lwgtylha It seems to be the same problem than Jonathan Someone can help? iuser59 tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1248965967 2009-07-30T14:59:27Z iuser59 said on July 30 2009 This is what I have when I include lowpro.js http://pastie.org/565370 iuser59 tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1249310914 2009-08-03T14:48:34Z Jonathan said on August 3 2009 Leumas, Lowpro requires prototype. Try including that. I don't see it in your pastie. Jonathan http://blog.jonathanrwallace.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1249717638 2009-08-08T07:47:18Z Leumas said on August 8 2009 Thanks, for the help. Been waiting a while and I will see if those tips work. Best, Leumas Leumas http://www.laowise.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1250617315 2009-08-18T17:41:55Z EH said on August 18 2009 Does this video really only have 10 keyframes? EH tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1251470676 2009-08-28T14:44:36Z Nico said on August 28 2009 Anyone using Amazon S3 who is interested in uploading multiple files (with progress bars, simultaneously) directly to S3 without hitting the server might be interested in my posts here: http://www.railstoolkit.com/posts/fancyupload-amazon-s3-uploader-with-paperclip http://www.railstoolkit.com/posts/uploading-files-directly-to-amazon-s3-using-fancyupload Nico http://nicoritsche.com tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1266506638 2010-02-18T15:23:58Z nurbs999 said on February 18 2010 Nice tutorial, it works, but my flash notices aren't displayed even though they are in my index-layout. any hints for that? nurbs999 tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1266870782 2010-02-22T20:33:02Z Brad said on February 22 2010 Thanks for the work. It was a great help. Is anyone else having problems with the progress bar updating in Webkit based broswers. I've tried both Chrome and Safari. Firefox & IE both work perfectly. I have modified the form & controller, but I've left the JavaScript in tact from the example above. Any ideas? Brad tag:railsillustrated.com,2009-03-03:/screencast-file-uploads-progress-in-rails-passenger/comments/1267710011 2010-03-04T13:40:11Z Marc said on March 4 2010 I'm trying to install this on a dreamhost server and it doesn't want to install the module. When I do the second step with the 'apxs' command it says it doesn't know that command… how can i install this on a remote server? Thanks. Marc http://marclipovsky.com