Resuming a download

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?

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

Re: [Rails] Re: Resuming a download

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

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

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