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.

File upload field not working

April 20, 2011 9:09pm

Subscribe [2]
  • #1 / Apr 20, 2011 9:09pm

    ozmo

    56 posts

    Hi guys,

    Here is my simple code to make an article downloadable and all has been well until upgrading to 2.1.3 latest build.

    {if file_upload != ''}
        <a href="http://{file_upload}class=button_link"><span>Download complete article</span></a>
    {/if}

    The field (file_upload) is not only NOT selectable within the template but is also enclosing the file extension in strange looking P tags therefore breaking the download link on all existing downloadable files.

    <a href="http://www.mydomain.com/news/news_feature_file/p&gt.pdf">http://www.mydomain.com/news/news_feature_file/p>.pdf</a>

    Please help… this is urgent!!

    Thanks,
    Rob

  • #2 / Apr 20, 2011 11:27pm

    ozmo

    56 posts

    I’ve also just discovered that the ‘Remove File’ option associated with my custom field (file_upload) does not work either.

    What the hell. Everything is just failing :(

    Will going to 2.1.4 fix any of these issues?

  • #3 / Apr 20, 2011 11:42pm

    Cheif

    626 posts

  • #4 / Apr 21, 2011 12:07am

    ozmo

    56 posts

    Try using the wrap parameter: http://ellislab.com/expressionengine/user-guide/modules/channel/custom_fields.html#file_fields

    {file_upload wrap="link"}

    Thanks Cheif but that has not resolved the issues.

    Any other ideas?

  • #5 / Apr 21, 2011 12:40am

    Cheif

    626 posts

    What do you get if you just place {file_upload} in ur template without the href ?

  • #6 / Apr 21, 2011 12:51am

    ozmo

    56 posts

    What do you get if you just place {file_upload} in ur template without the href ?

    Are you suggesting…

    <a class="button_link"><span>Download complete article</span></a>
  • #7 / Apr 21, 2011 12:54am

    Cheif

    626 posts

    No, just place {file_upload} anywhere on ur template and see what gets rendered out. To identify whether the field is wrapping itself with tags or if it’s something we’re introducing 😊

  • #8 / Apr 21, 2011 1:06am

    ozmo

    56 posts

    Ah… i see.

    Here’s the output of {file_upload}.

    p>.pdf

  • #9 / Apr 21, 2011 1:36am

    Cheif

    626 posts

    That’s some freaky sh!t right there. Can you confirm the same behavior with different files/types or is just the one entry that’s causing this ?

    Also, you are using just the generic “file” field type and not inside a matrix or anything else ?

  • #10 / Apr 21, 2011 11:24am

    Sue Crocker

    26054 posts

    Thanks for the assist, Cheif.

    rgoggins, which file type are you using with this?

    What about third party add-ons? Which ones are you using? Is it any .pdf file?

  • #11 / Apr 21, 2011 9:45pm

    ozmo

    56 posts

    Sorry for the delay. I’ve been trying to get my head around this.

    I’ll start again…

    Any file fields I create or have created do not work, period.

    Existing file fields with File Type set to ‘Any’ are outputting something like this…

    <a href="http://www.mydomain.com/new/thisisafile/p&gt.pdf">http://www.mydomain.com/new/thisisafile/p>.pdf</a>

    ...on all existing links to PDFs. I’m only linking to PDFs at this stage.

    All existing file fields with File Type set to ‘Image’ are displaying the uploaded image correctly.

    Now, If I create a new file field with either Any or Image being set as the File Type the result is… well nothing works. The field name is present within the EE channel but there is no way to upload or delete. Th links simply aren’t there (see screenshot).

    Any ideas?

    Thanks again,
    Rob

  • #12 / Apr 21, 2011 11:02pm

    ozmo

    56 posts

    All fixed, i think!

    I read this post and simply updated all my Add-Ons and most of all my problems have been resolved.

    Thanks for all your assistance Chief.

    Cheers,
    Rob

  • #13 / Apr 22, 2011 11:22am

    ozmo

    56 posts

    Thanks to Sue also!!

  • #14 / Apr 22, 2011 6:23pm

    Sue Crocker

    26054 posts

    Glad things are working again.. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases