Support

Account

Home Forums General Issues Output Download URL

Helping

Output Download URL

  • Hi all, I am making a custom research archive and need a bit of help. Basically I have a custom “content > file” field set up for inputting a downloadable file. The code below shows how I have succesfully implemented the field output in my template:

    <a target="_blank" href="<?php the_field('pdf_download'); ?>" title="Download PDF"> <img class="pull-left pdf-icon" src="LINKURL" width="51" height="77" alt="Download PDF" />
    		<div class="post" id="post-<?php the_ID(); ?>"></a> 

    Now here’s the glitch. I really don’t want to store my downlaods in the Media Library since there will end up being alot. Right now I have the “Download Monitor” plugin installed. The plug in generally outputs the download link as a shortcode, however, I can also grab the download link which would look something like mysite.com/download/ID#. I haven’t been able to figured out what combination of “File Type” option to choose with this alternate method. Can anyone help?

  • Hi @streetfire

    All files / images uploaded through ACF are uploaded to the ep-content/uploads directory.

    If the plugin ‘Download Manager’ is simply adding some url rewrites to change the look of the file’s url, then I would ask them how to get the URL from the attachment ID.

    Please change the return type for your image to ID if this is needed, then you can pass this through one of the 3rd party functions to obtain the url.

    Thanks
    E

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Output Download URL’ is closed to new replies.