Displaying 20 results from an estimated 22 matches for "upload_id".
2007 Mar 23
1
upload progress bar don''t work...please help
...'/files/'',:controller=>"files"
files_controller : #####################
class FilesController < ApplicationController
session :off, :only => :progress
def index
end
def progress
render :update do |page|
@status = Mongrel::Uploads.check(params[:upload_id])
logger.info(params[:upload_id])
page.upload_progress.update(@status[:size], @status[:received]) if
@status
end
end
def upload
render :text => %(UPLOADED: #{params.inspect}.<script
type="text/javascript">window.parent.UploadProgress.finish();</scri...
2007 Feb 27
11
Mongrel upload progress not showing progress on production server
...th the mongrel instances and the upload.rb script.
Below are the relevant log entries and code snippets. Thanks!
data_file.rb:
?
def progress
warn ''progress''
render :update do |page|
warn ''update''
@status = Mongrel::Uploads.check(params[:upload_id])
warn @status.inspect
page.upload_progress.update(@status[:size], @status[:received]) if @status
end
end
?
mongrel.log:
...
progress
update
nil
progress
update
nil
progress
update
nil
?
production.log:
Processing DataFilesController#progress (for 201.17.52.1 at 2007-02-23
22...
2006 Nov 13
6
mongrel_upload_progress question/possible suggestion
...of various
routing info in my app.
Thus, the ability for path_info to be a regex instead of just a string, thus
allowing for:
return unless params[''PATH_INFO''] =~ @path_info &&
params[Mongrel::Const::REQUEST_METHOD] == ''POST'' &&
upload_id = Mongrel::HttpRequest.query_parse
(params[''QUERY_STRING''])[''upload_id'']
Then I just update my handler like so:
uri "/",
:handler => plugin("/handlers/upload", :path_info =>
%r{/account/\d/\d/media/upload}),
:in_front => true
A...
2006 Sep 17
1
Question about mongrel_upload_progress
...ing up with a steadily decreasing number, which looked
suspiciously like the remaining number of bytes left to upload.
Here''s the routine I changed:
private
def upload_notify(action, params, *args)
system("echo path info comparison worked! >>/tmp/test")
upload_id = Mongrel::HttpRequest.query_parse(params
[''QUERY_STRING''])[''upload_id'']
system("echo Upload id #{ upload_id } found >>/tmp/test")
if params[Mongrel::Const::REQUEST_METHOD] == ''POST'' && upload_id
system...
2007 Feb 23
0
Mongrel::Uploads.check() not returning status
Hi,
I wrote a message earlier regarding how I wasn''t getting any feedback
from mongrel_upload_progress. After putting lots of debug messages
in the plugin, I figured out what was going on.
I had a route like this setup in routes.rb (this was the problem):
map.upload "upload/:upload_id",
:controller => "file",
:action => "upload"
And here''s my config/mongrel_upload_progress.conf file:
uri "/",
:handler => plugin("/handlers/upload", :path_info => ''/file/upload'&...
2007 May 18
4
No return status from mongrel upload progress (and thus no updates on the bar)
...irb(main):002:0> uploads.list
=> []
Nice regular output in my development.log:
Processing UploadsController#upload_progress (for 127.0.0.1 at
2007-05-18 15:20:29) [POST]
Parameters: {"action"=>"upload_progress", "controller"=>"uploads",
"upload_id"=>"aff07334-04ee-11dc-bd4b-000d608392b8"}
Completed in 0.00966 (103 reqs/sec) | Rendering: 0.00848 (87%) | 200 OK
[http://localhost/uploads/upload_progress?upload_id=aff07334-04ee-11dc-b
d4b-000d608392b8]
Processing UploadsController#upload_progress (for 127.0.0.1 at
2007-05-18...
2006 Jun 16
2
Javascript error?
...what is preventing the requests from being made?
How do I go about fixing it?
Thanks, Ryan
Here is all the relevant code:
--Generated HTML--
<form action="/album/new/4" enctype="multipart/form-data"
method="post" onsubmit="if (this.action.indexOf(''upload_id'') < 0){
this.action += ''?upload_id=1''; }this.target =
''UploadTarget1'';$(''UploadStatus1'').innerHTML=''Upload starting...'';
if($(''UploadProgressBar1'')){$(''UploadProgressBar1'').fi...
2006 Sep 20
0
boy, that mongrel_upload_progress handler sucks!
...9;'),
:in_front => true
# add the callback to the actual handler.
::Upload.class_eval do
def request_aborted(params)
return unless params[''PATH_INFO''] == @path_info &&
params[Mongrel::Const::REQUEST_METHOD] == ''POST'' &&
upload_id =
Mongrel::HttpRequest.query_parse(params[''QUERY_STRING''])[''upload_id'']
instance_variable_set(checked_var(upload_id), nil)
Mongrel::Uploads.finish(upload_id)
end
end
I''m going to work this into svn. But, there''s another issue. Using...
2007 May 14
7
Help a newb with 0.3.1
Hi, first off thanks Ezra for Merb - it''s certainly interesting and
I''m keen to have a play. However, I''m having difficulties in getting
started. I''ve followed the docs for setting up mrblog and everything
seems to be installed correctly, and merb appears to start fine:
$ merb
you must install the markaby gem to use .mab templates
you must install the
2006 Dec 25
4
Definitive guide for upload progress
...ized constant
Mongrel::Uploads". Status remains at 0% and picture is uploaded.
The DRb client always lists an empty array during uploads (get_status.list).
And in the rails controller I tried:
def progress
render :update do |page|
@status = Mongrel::Uploads.instance.check(params[:upload_id])
page.upload_progress.update(@status[''size''],
@status[''received'']) if @status
end
end
as well as the "original"
def progress
render :update do |page|
page.upload_progress.update @status[:size], @status[:received]
end if @s...
2006 May 11
7
Upload progress "plugin"
...t; Mongrel::ProgressHandler.new
uri "/favicon", :handler => Mongrel::Error404Handler.new("")
trap("INT") { stop }
run
end
end
config.join
Yeah, so, notice the ProgressHandler class and the require. In your forms:
<form action="?upload_id=XXX" enctype="multipart/form-data">...</form>
Since the handler is mounted at ''/progress'', you can hit
''/progress?upload_id=XXX'' to read the stats:
size: 55575
received: 11131
Left to do:
* XML/YAML/JSON output. (based on the Acc...
2008 May 05
0
mongrel_upload_progress_bar - where are my files?
...D--56884b6ccd656497d776379fa23d7909bc5afb83
> Parameters: {"commit"=>"Upload",
> "authenticity_token"=>"6a06cc13fcb42087ee3a74e2e6a16c2c0d1df8f6",
> "action"=>"upload", "controller"=>"files", "upload_id"=>"1209944944",
> "data"=>#<File:/var/folders/wY/wYe0+otlEPq0TtDuamD7IU+++TM/-Tmp-/
> CGI808-2>}
> Completed in 0.00295 (339 reqs/sec) | Rendering: 0.00005 (1%) | DB:
> 0.00000 (0%) | 200 OK [http://127.0.0.1/files/upload?upload_id=1209944944
> ]...
2008 May 05
0
mongrel_upload_progess_bar - where are my files?
...D--56884b6ccd656497d776379fa23d7909bc5afb83
> Parameters: {"commit"=>"Upload",
> "authenticity_token"=>"6a06cc13fcb42087ee3a74e2e6a16c2c0d1df8f6",
> "action"=>"upload", "controller"=>"files", "upload_id"=>"1209944944",
> "data"=>#<File:/var/folders/wY/wYe0+otlEPq0TtDuamD7IU+++TM/-Tmp-/
> CGI808-2>}
> Completed in 0.00295 (339 reqs/sec) | Rendering: 0.00005 (1%) | DB:
> 0.00000 (0%) | 200 OK [http://127.0.0.1/files/upload?upload_id=1209944944
> ]...
2006 Apr 11
0
upload_progress with apache
...:29:09) [POS\
T]
Session ID: 556c9a44ce6452a22bc1dbbab3ee5a2f
Parameters: {"commit"=>"Upload", "action"=>"create",
"document"=>{"content"=>\
#<File:/tmp/CGI6821.0>}, "controller"=>"sort", "upload_id"=>"6"}
Rendering sort/create
Completed in 0.09598 (10 reqs/sec) | Rendering: 0.00064 (0%) | DB:
0.00000 (0%)\
| 200 OK [http://dev.mos-office.net/sort/create?upload_id=6]
with none of the
# ?Multipart upload with progress (id: 1, size: 85464)?
# ?Finished processing multipart...
2007 Jan 19
0
Mongrel::Uploads.check() not returning status
...9;'/listings/
add_photo''),
:frequency => 1,
:in_front => true
Then I start mongrel like this ...
mongrel_rails start -d -p 3000 -S config/mongrel_upload_progress.conf
In my controller''s progress method I call ...
@status = Mongrel::Uploads.check(params[:upload_id])
However, @status is always nil. Any ideas? The upload_id is properly
being sent.
The file does upload; but the progress bar just goes from 0% to 100%
once the upload is finished.
Thanks.
Bill Siggelkow
AIM: siggelkowb
-------------- next part --------------
An HTML attachment was scrubb...
2006 Sep 04
3
Mongrel Upload Progress 0.2 -- With Instructions and Examples
Hi Folks,
I''m sure tons of people are gonna ruin a whole drawer of their best
panties over this one.
Rick Olson worked on the mongrel_upload_progress gem, documentation and
examples and has almost everything you need to do progress tracked file
uploads using just Mongrel to handle the upload. This means that Rails
(or any other framework) isn''t blocked while the upload
2006 Nov 28
34
Uploading Large (100mb+) files
I have an Apache 2.2.3 (mod_proxy_balancer) frontend server that does
not have mongrel installed. It does proxy requests to several other
mongrel-only servers (each running 2 mongrel processes). Each mongrel
node has the same rails code-base and it''s working perfectly.
However, my question is when I add an upload file form... where is it
going to physically put that file? I mean since
2007 Jul 08
1
streaming upload progress plug-in
...hods of doing Ajax calls through streaming
responses. I''ve created a little javascript library (which depends on
prototype.js) that can interpret a stream of JSON objects separated by
semicolons.
As an application of this, this Mongrel plug-in streams upload status
when given a qualified upload_id. It looks like this:
{"received":5939792,"status":200,"state":"uploading","size":36872784};
{"received":6398544,"status":200,"state":"uploading","size":36872784};
[...]
{"received":...
2006 Feb 04
0
form_tag_with_upload_progress
...t;
<%= upload_status_tag %>
</div>
<%= end_form_tag %>
after finish upload it makes an ajax request to the same action,
this works fine but if i take a look at the console where i have started
the webbrick server, i can see that it calls permanently the
/picture/upload_status?upload_id=.. with different frequencies
this can''t be correct??
what am i doing wrong??
thanks for help!
--
Posted via http://www.ruby-forum.com/.
2007 Apr 22
0
request_ends callback
...some processing of the file after the upload (like pushing it to
Amazon S3 in the back) and I''d like to continue providing user feedback
through the progress HTTP requests The nicest way to do that would be to
leverage the UploadProgress class since it has an instance for the
specific upload_id. However, before my merb process handler gets called,
the UploadProgress is deleted. I''d be glad to insert a request_ends
callback into mongrel itself, but I''m not sure where to hook it. Would
HttpServer#process_client right after the "handlers.each do" be a good spot...