We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45210
    • 4 Posts
    Christeen Kh Reply #1, 13 years ago
    Hi,

    I am really new in this modx. I am trying to learn it on my own.

    I have an img file (firmware) which refers to several products. I do not want to create the same file under each product. I want to create the file once and to make reference to it by creating a symlink to it under each product. What I did was creating a symlink and inserting the target resource (the file) ID in the symlink. When I viewed the symlink it did not work properly. I expected it to open the file I want, but what it actually gave me was an html page with nonsense words.

    Could someone please advise?

    thanks,
    Christeen

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You need to go into the symlink's Settings tab and set it to have a Content Type of "IMG", and Content Disposition of "Attachment".

      Any time the browser sees a content type of Inline it displays the content - or tries to, anyway, binary files are not human-readable, they're just binary computer code. A Content Disposition of Attachment will cause the browser to offer the download dialog box, or if the browser has been configured to do so it may open an application to display the file, like the Adobe reader to display .pdf files or Word to display .doc files.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 10208 ☆ A M B ☆
        • 1,780 Posts
        I'm wondering if a static symlink is the best approach for this. You could very well just make an image TV and set it to default to this image file. Or, a chunk with the image tv placed into the html.

        Symlinks are great for pointing to pages/resources on your website, but not exactly intended to serve images, and neither are static resources the best option for that matter. Serving links to pdf's or other files intended for download or inline display however, is a mighty handy option.



          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          That's not a picture image... it's a software image for updating operating system stuff. Different meaning for "image" wink
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            Oh, duh! OK, then perfect.
              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • 45210
              • 4 Posts
              Christeen Kh Reply #6, 13 years ago
              Thanks You both! everything is ok now smiley