Yii Framework Forum: [EXTENSION] EDownloadHelper - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] EDownloadHelper Download a file with resume, stream and speed options

#1 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,462
  • Joined: 04-October 10

Posted 24 January 2011 - 02:48 PM

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.yiiframew...downloadhelper/

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
0

#2 User is offline   Gustavo 

  • Master Member
  • Yii
  • Group: Moderators
  • Posts: 916
  • Joined: 27-July 10
  • Location:Curitiba - Brasil

Posted 24 January 2011 - 03:14 PM

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
--
Extensions:
translate modue - module to handle translations
multiActiveRecord - db selection in models
redisCache - redis cache component
mpCpanel - interact with cpanel api
mUploadify - use uploadify uploader in your application

Gustavo Salomé Silva
0

#3 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,462
  • Joined: 04-October 10

Posted 24 January 2011 - 03:23 PM

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.
0

#4 User is offline   Rangel Reale 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 69
  • Joined: 14-January 10

Posted 29 January 2011 - 10:45 AM

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?
0

#5 User is offline   Rangel Reale 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 69
  • Joined: 14-January 10

Posted 29 January 2011 - 10:48 AM

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

@ob_flush();
0

#6 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,462
  • Joined: 04-October 10

Posted 29 January 2011 - 01:15 PM

View PostRangel Reale, on 29 January 2011 - 10:48 AM, said:

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
0

#7 User is offline   neverabe 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 21-March 11

Posted 27 July 2011 - 11:51 PM

Nice extension! ;D
0

#8 User is offline   mwrn 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 30-November 11

Posted 06 December 2011 - 11:24 AM

Hi, thanks for the extension.

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?


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

#9 User is offline   MeGusta 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 18-April 12
  • Location:Mongolia

Posted 19 April 2012 - 02:13 AM

View PostAntonio Ramirez, on 29 January 2011 - 01:15 PM, said:

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


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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users