Upload

hello everyone,

i have written an upload controller which handles files in a multipart-
form. it scans through the bytes to check if it’s an acceptable file.
my problem is to get the progress of the upload of a single file. i
loop through my params to move every file to the server and it’s
working properly.

is there a method to check whether a file has been completely
transfered (in rails!)?

regards

before u r uploading file,u could get the size of file.so compare the
size.

2012/3/27 Aaron S. [email protected]


*Ըϲͬ!

ʯҾ
ϢѧԺ ϵӦ÷
Dalian NEUSOFT Institute of Information
й-԰·8
ʱࣺ116023
*Mail:[email protected] [email protected]
Phone:15242613529

i’ve got a multipart-form with

<%= file_field_tag ‘objects[]’, :id => ‘file’, :multiple => true %>

rails does the upload when i click on “go”. in firebug i can see that
there is a post 200 going on and i can see how long the upload takes.
how can i access this whithout ajax?

oh.sorry.u’d better get to know subprocess.certainly,subprocess is a way
in
python.

2012/3/27 Aaron S. [email protected]

“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


*Ըϲͬ!

ʯҾ
ϢѧԺ ϵӦ÷
Dalian NEUSOFT Institute of Information
й-԰·8
ʱࣺ116023
*Mail:[email protected] [email protected]
Phone:15242613529

On 27 Mar 2012, at 14:59, Aaron S. [email protected]
wrote:

i’ve got a multipart-form with

<%= file_field_tag ‘objects[]’, :id => ‘file’, :multiple => true %>

rails does the upload when i click on “go”. in firebug i can see that
there is a post 200 going on and i can see how long the upload takes.
how can i access this whithout ajax?

The only way I know of accessing upload progress info is either using a
flash uploader or an apache module like
https://github.com/drogus/apache-upload-progress-module (there is an
equivalent plugin for nginx if my memory is correct)

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs