ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Download Content Plugin

September 20, 2011 4:36pm

Subscribe [10]
  • #31 / Nov 04, 2011 10:41am

    bgarrant

    356 posts

    I see, thanks for sharing, bgarrant!

    Is there a way to just make the file save box popup without creating a redirect page (new tab)?  Every time I click VIEW to see any template within the Control Panel it launches a new window and then a second window to save the file.  If I was just viewing the template it would be fine, but in this case I just want to force a file save.  Is there a way to do this?

  • #32 / Nov 04, 2011 10:56am

    Derek Jones

    7561 posts

    From the control panel, no.  The redirect from the view link is to prevent your control panel URL from showing up in referrer logs.  From the front end, though, a link to the template should just download the file.

  • #33 / Nov 04, 2011 11:00am

    bgarrant

    356 posts

    From the control panel, no.  The redirect from the view link is to prevent your control panel URL from showing up in referrer logs.  From the front end, though, a link to the template should just download the file.

    I do not want non-members to get the CSV, so if I remove all access other than the one group and enable HTTP Auth that would force a login correct if someone hit that page?

    If I remove HTTP Auth it would just redirect back to whatever page I specify in Access.

    You can remove all these unrelated posts to the core topic of your plugin if you like?  I am very thankful for all your help.  Working on by 12th EE site now and could not be happier!  I have to get in the Pro Network at some point.

  • #34 / Nov 04, 2011 11:00am

    Derek Jones

    7561 posts

    Your conclusion is correct and sounds like a great solution.  I’ll keep the posts here, as I’m certain the information will be useful to future readers.  Thanks for the kind words bgarrant!

  • #35 / Nov 10, 2011 3:34pm

    bgarrant

    356 posts

    We just pushed a new, very simple free plugin to our GitHub accountDownload Content is handy if you are using channels to manage information that you want to have available as file downloads for your visitors.  It’s essentially a very simple way to utilize CodeIgniter’s download helper within an ExpressionEngine template.  It takes arbitrary content, and sends it to the browser with the proper file type headers for download.

    For example, we’re using it on our intranet to have… Continue reading…

    How can I just force the download of a file Derek?  I have a PDF file stored in a field called {applications_prg}.

    {exp:channel:entries limit="1" require_entry="yes" channel="applications_files"}
    {exp:download_content filename="{applications_prg}"}
    {applications_prg} 
    {/exp:download_content}
    {/exp:channel:entries}

    Is there some other way I should do this or use another module?  I am trying to make a template force a download or a file when launched.

  • #36 / Nov 11, 2011 10:35am

    Derek Jones

    7561 posts

    What’s actually stored in that field, bgarrant?  A file name? Path to the file?  The binary contents of the PDF itself?  (Latter doesn’t seem likely.)

  • #37 / Nov 11, 2011 10:45am

    bgarrant

    356 posts

    What’s actually stored in that field, bgarrant?  A file name? Path to the file?  The binary contents of the PDF itself?  (Latter doesn’t seem likely.)

    The PDF is actually a file uploaded via a channel entry.  A channel entry exists and the file is in an uploads folder.  How can I force it to download?  Should I use another plugin or method?  I need to place some code in a template to force a download of the file when the temnplate is launched.

  • #38 / Nov 11, 2011 10:48am

    Derek Jones

    7561 posts

    So you are wanting a file stored on the server to be downloaded via some arbitrary ExpressionEngine URL instead of a traditional link to the file?  If that is correct then I would look at the Downloader plugin or the Download File plugin.  The plugin in this thread is designed to output template content to a file, not to deliver files stored on the server, which both of the aforementioned plugins do.  Hope that helps!

  • #39 / Nov 11, 2011 10:51am

    bgarrant

    356 posts

    So you are wanting a file stored on the server to be downloaded via some arbitrary ExpressionEngine URL instead of a traditional link to the file?  If that is correct then I would look at the Downloader plugin or the Download File plugin.  The plugin in this thread is designed to output template content to a file, not to deliver files stored on the server, which both of the aforementioned plugins do.  Hope that helps!

    I will try them Derek.  I can easily link direct to the file myself, but the link will be in a navigation bar and my client will have a hard time finding the full file URL if they ever need to change it.  That is why I want to use a template so they can just update the channel entry.  Thanks for your advice.

  • #40 / Nov 11, 2011 10:52am

    Derek Jones

    7561 posts

    Sounds like a great idea, bgarrant!  I think either one of those plugins should do fine.

  • #41 / Nov 11, 2011 10:53am

    bgarrant

    356 posts

    So you are wanting a file stored on the server to be downloaded via some arbitrary ExpressionEngine URL instead of a traditional link to the file?  If that is correct then I would look at the Downloader plugin or the Download File plugin.  The plugin in this thread is designed to output template content to a file, not to deliver files stored on the server, which both of the aforementioned plugins do.  Hope that helps!

    Downloader looks good but I can’t find a place to download it.  Is it just a Beta?

    http://duktee.com/addons/downloader

  • #42 / Nov 11, 2011 10:55am

    Derek Jones

    7561 posts

    Ah, looks like they’ve taken it down whilst working on it.  You might contact them directly, or just use Download File which is still active on GitHub.

  • #43 / Nov 11, 2011 11:11am

    bgarrant

    356 posts

    Ah, looks like they’ve taken it down whilst working on it.  You might contact them directly, or just use Download File which is still active on GitHub.

    I will have to wait for it I guess.  The Download File is just for forcing a non-broser opening.  Not for forcing a download of a file.  Do you know of any way for a client to easily see the full path of a file that was uploaded?  If I could display that for them it would be easy as they could copy/paste the URL to the file into NavEE Manual link.

  • #44 / Nov 11, 2011 11:14am

    Derek Jones

    7561 posts

    Can you not just output the menu item with the channel entries tag?  That said, I think the Download File plugin can do what you want to, you’d use the :link tag in the menu, and the :serve in the template.

  • #45 / May 02, 2012 5:33am

    jensa

    109 posts

    A very simple alternative to this that is also much more flexible is the HTTP Header plugin:
    http://devot-ee.com/add-ons/http-header

    Worked much better for me in that it does not terminate parsing.

    J

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases