[EXTENSION] EDownloadHelper

Hi guys,

I was curious on a question formulated in this forum and after reviewing its request, didn’t found anything to help him. He was asking for a download helper extension. This is why I went on the net and read some pretty neat tutorial about downloading a file with reume, streamming and speed options.

I tested it but I would like some feedback before I submit it to the extension repository.

Uploaded to the extensions section: http://www.yiiframework.com/extension/edownloadhelper/

If useful, I am thinking to include some other options like avoiding direct file downloads (hiding real paths), and so on…

Thanks in advance

  • 2011-01-25 Bugs Fixed, now resumes downloading as expected and files are not corrupted

Thanks ! another one of you very usefull

You are doing a great job

and yes I was curious about the download resume option too

The secret is in the http headers I see now

Tell me if it works for you and I will post it to the extension repository

I have submitted the extension to the extensions section.

I’m getting this error sending a PDF file, at the end:

"ob_flush(): failed to flush buffer. No buffer to flush."

I am calling it directly from the action, and doing a "die" just after the download command, should I use a view to use this component?

I added a "@" before the ob_flush command and it seems do fix it.

@ob_flush();

Thanks for that tip Rangel…: I will fix that asap

Nice extension! ;D

Hi, thanks for the extension.

[s]I have a similiar php downloader that works in streaming movies.

while using this extension i can download the movie but i cant stream it.

i use this code, that suppose to work




EDownloadHelper::download($Play->filepath,1000,true);



still cant stream

and i change the extension function to dostream = true still not streaming




public static function download( $filepath, $maxSpeed = 1000, $doStream = true ){



can u help post example using stream?[/s]

Edited: sorry it works, bad luck for me trying same broken video for half days.

tnx Antonio, i resulted ob_end_clean() error, added @ to ob_end_clean(), and fix it