Is there a document somewhere that describers how I would implement, in Rails, a "resume download"? I have a large video I want people to download (if they want to). My partner has a bad Internet connection and it crashed several times and he wanted to resume but the download wouldn''t. How do I set things up so that a download is restartable? Is this a Rails issue or am I way OT? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mar 11, 12:27 am, Ralph Shnelvar <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Is there a document somewhere that describers how I would implement, in > Rails, a "resume download"? > > I have a large video I want people to download (if they want to). > > My partner has a bad Internet connection and it crashed several times > and he wanted to resume but the download wouldn''t. > > How do I set things up so that a download is restartable?You need to support partial gets: if the get request contains (for example) Range: 500000- then you only send bytes from that offset. If this is just a static asset then it''s nothing to do with rails: you need to make sure that your web server''s configuration allow this. If it''s something being sent via send_file etc. then i''d hope that rails would handle this for you Fred> > Is this a Rails issue or am I way OT? > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
FC> On Mar 11, 12:27 am, Ralph Shnelvar <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>> Is there a document somewhere that describers how I would implement, in >> Rails, a "resume download"?>> I have a large video I want people to download (if they want to).>> My partner has a bad Internet connection and it crashed several times >> and he wanted to resume but the download wouldn''t.>> How do I set things up so that a download is restartable?FC> You need to support partial gets: if the get request contains (for FC> example) Range: 500000- then you only send bytes from that offset. FC> If this is just a static asset then it''s nothing to do with rails: you FC> need to make sure that your web server''s configuration allow this. If FC> it''s something being sent via send_file etc. then i''d hope that rails FC> would handle this for you Frederick, Thank you. Again, this is way over my head. The line of HAML I have is: = link_to ''(MP4)'', ''/videolib/Workstation-Suspend-Put-001.mp4'', ''class'' => video_type_link_to The user clicks on "(MP4)" and the download automagically begins. Does the link_to initiate a send_file? Should I be doing a send_file explicitly? How? These large-ish (100MB each) videos are fairly static ... maybe being updated once a week or less. Ralph -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mar 11, 10:13 am, Ralph Shnelvar <ral...-bVGy8FV858MAvxtiuMwx3w@public.gmane.org> wrote:> Thank you. Again, this is way over my head. > > The line of HAML I have is: > = link_to ''(MP4)'', ''/videolib/Workstation-Suspend-Put-001.mp4'', ''class'' => video_type_link_to > > The user clicks on "(MP4)" and the download automagically begins. > > Does the link_to initiate a send_file? Should I be doing a send_file explicitly? How? > > These large-ish (100MB each) videos are fairly static ... maybe being updated once a week or less.Ok, this is just a file in your app''s public folder, right? If so, then it shouldn''t be being served by rails (whatever handles your static assets (apache, nginx etc.) should be handling them. You should probably delve into your web server configuration to find out how to get it to do partial gets. Fred> > Ralph-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.