We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18654
    • 191 Posts
    My current workaround is to create duplicate content. For each Static Resource create a corresponding Document Resource with all the TV info that you need. Then, make one of the TV fields a StaticResourceId field so that you can associate the Document Resource with the Static Resource.

    If I remember correctly, even with this workaround I was still having issues with large downloads, so I had to create a plugin that redirected large download requests to a regular php script that was located outside the Modx Core.
      God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
      • 21635
      • 81 Posts
      ah, i see. will head in that direction and see where it gets me.
      thanks a lot, so far!
        • 22303 MODX Staff
        • 10,725 Posts
        It’s a bug, #MODX-2100 -- it is being addressed as quickly as possible. You will be able to associate a template with binary Resources.
          • 18654
          • 191 Posts
          That’s great to hear! That’ll be a huge help.
            God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: OpenGeek at Jul 03, 2010, 01:41 PM

            It’s a bug, #MODX-2100 -- it is being addressed as quickly as possible. You will be able to associate a template with binary Resources.
            I’m testing this and not having any problems with PDF’s. There is a separate issue when creating a new binary Content Type; it does not mark it as binary, though this has been committed and fixed as of a few seconds ago. Thank you splittingred.
              • 28215
              • 4,149 Posts
              To echo what Jason said: Ensure your PDF content type is mime_type "application/pdf", and "binary" is checked.
                shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • 21635
                • 81 Posts




                Thanks for checking the issue, but unfortunately i can’t reproduce it as well. can’t make it work.

                above you see some of my settings. i run rev6923.

                what got me wondering was:
                when i have an (empty)-template on the static ressource and i turn the content type to html, i get this

                indicating, that the pdf file is actually correctly linked, but now interpreted as html/text.

                when i switch the content-type to pdf and preview the resource, i then get a script error 500.

                when i then assign a template to the pdf-content-type and preview, i see a blank page in safari; in ff it prompts me to chose a pdf-viewing method, but the resulting pdf-document is 0kb and broken.

                can it be some background processes, that are not supported on my server-setup, like some php-extensions or sth, that need to be there to work?
                  • 28215
                  • 4,149 Posts
                  Well, what’s in your Template?
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 21635
                    • 81 Posts
                    Well, what’s in your Template?

                    Well, actually it is an empty template. I just assigned it to have the possibility to assign TVs to the ressource.
                    I wanted to output a list of PDF Resources through getResources on another page to provide downloads with extra-metadata.

                    Should there something be in the template to work?
                    I suspected some kind of content-type error since "html" outputs the file-content, while "pdf" gives an error 500...
                      • 28215
                      • 4,149 Posts
                      You should only have this in the Template:

                      [[*content]]
                      
                        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com