Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel Horn 319 posts 344 karma points
    Mar 25, 2010 @ 18:44
    Daniel Horn
    0

    PDF upload

    Hi ! :-),

    I was wondering about what the best way is to create this:

    I have a PressItem doctype and i want the user to be able to upload a PDF file and then it will be listed on the website with a nice little pdf icon.

    They have to be able to upload it when editing the node, i do not want them to upload the pdf to the media lib first and then link to it.

    What's the best practise here?

  • Comment author was deleted

    Mar 25, 2010 @ 19:05

    If you do not want to use the media library to store the document simply use the upload datatype instead of a media picker  then the end users can simply upload it on the doc itself

  • Daniel Horn 319 posts 344 karma points
    Mar 26, 2010 @ 00:29
    Daniel Horn
    0

    And how would you go about stripping the path into something nice? Can i extract the name of the file and fx size using the upload datatype?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 26, 2010 @ 00:57
    Jan Skovgaard
    0

    How are you fetching the files now?

    isn't something like <a href="{$currentPage/data [@alias = 'pdf']}">Get the PDF</a> doing the trick for you?

    /Jan

  • Daniel Horn 319 posts 344 karma points
    Mar 26, 2010 @ 06:48
    Daniel Horn
    0

    <a href=" <umbraco:Item field="fileUpload" runat="server"></umbraco:Item>">Læs PDF fil her</a> in the template right now.

     

    But i would like the link to be something like "filename.pdf 10kb"

Please Sign in or register to post replies

Write your reply to:

Draft