Announcement

Collapse
No announcement yet.

Download file from grid?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Download file from grid?

    Hello,

    Ik have a grid with a field (text) that contains a filename based on other fields of the record (thru the onrecord event).
    Now i want to add the possibilty to download the file from the grid?

    What is the best way to do this? i tried to add a field of type "document (filename)"
    I can see a link then, but when i click there is a blank page and scriptcase seems to load a php file?

    Kind regards,

    Marco

  • #2
    Originally posted by mgreven70 View Post
    Hello,

    Ik have a grid with a field (text) that contains a filename based on other fields of the record (thru the onrecord event).
    Now i want to add the possibilty to download the file from the grid?

    What is the best way to do this? i tried to add a field of type "document (filename)"
    I can see a link then, but when i click there is a blank page and scriptcase seems to load a php file?

    Kind regards,

    Marco
    Your approach is basically ok, but you need to set the download directory. While deploying (advanced) you can set this directory. Or you have to put the files on the default directory.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      What do you mean with the download directory?
      The files are in a seperate folder on the server or networkshare.

      Based on some fields the directory (or the path in the field) where the files are is known.

      Comment


      • #4
        The document(filename) field is working against the default download directory of scriptcase. So if you want to use that then you need to comply to SC rules to get it working. If you need to download from other locations than you need to create fields containing hyperlinks to those files or integrate some custom php to allow this.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          OK... then document(filename) is not working for me.

          Is there a sample where i can look how to do this?

          Comment


          • #6
            document filename works fine but you have to make an advanced deployment and set the paths properly. Then you have to deploy with that advanced deployment. Aducom was totally right.

            Comment


            • #7
              Or just build a link ponting to the location of the file to download
              /Giuseppe

              Professional Scriptcase Services
              Some Customers opinions

              Comment


              • #8
                But linking directly to a download location might have security issues depending on what's stored there...
                Albert Drent
                aducom software netherlands
                scriptcase partner, reseller, support and (turn-key) development
                www.scriptcase.eu / www.scriptcase.nl

                Comment


                • #9
                  Originally posted by aducom View Post
                  But linking directly to a download location might have security issues depending on what's stored there...
                  But you can't lock navigation access and just access download if you have the link.
                  /Giuseppe

                  Professional Scriptcase Services
                  Some Customers opinions

                  Comment

                  Working...
                  X