Forum Discussion

schauhan's avatar
schauhan
Ideator III
5 years ago

PDF and Image file handling

Hi,

On my latest installation of Aras open (12 SP9) clicking on pdf and image file (png, jpeg, etc) Files attached to Document item type automatically downloads it.  Changing Chrome setting related to how PDF files are handled or using different browsers seems to have no effect. 

I would like PDF and image files to open in a separate browser window as it did on an older installation of Aras 12 SP0.  Are there any server related settings that control how these file types are handled out of box?

Thanks.

-Sam 

14 Replies

  • Hi Sam,

    it should be possible to change file opening behavior with vault.config file in VaultServer. There you can change download behavior for each file type.

    1. attachment – downloaded in UI
    2. inline – load file in the browser

    Angela

    ---

    You liked this answer? Subscribe to my Youtube channel to learn even more about PLM --> PLM Underground on Youtube

    • schauhan's avatar
      schauhan
      Ideator III

      Thanks Angela,

      For MIME type image/png and application/pdf the Content-Disposition is set to inline in vault config file.  But for both types, Chrome opens a new blank window and then downloads the file to the default download folder while the blank windows just hangs in there.  The same client computer behaves differently with another Aras installation so it must be some server related settings but I cannot figure out what it could be.  I made sure that these MIME types are set in IIS but no luck.

      -Sam

      • angela's avatar
        angela
        Catalyst II

        I am not sure if this one is more a Chrome related restriction. I would also be interested in a solution. It´s indeed bring benefits when you can open PDFs directly. 

  • I have a same problem. Aras 11sp12 can view pdf online but with Aras 12sp9, the pdf file is downloaded (both use only Chrome browser). I have to tried edit vault.config, web.config but not succeeded.

    The work around is use extension Undisposition on Chrome

    • schauhan's avatar
      schauhan
      Ideator III

      Any input from Aras employees monitoring this forum will be much appreciated.  It is a big convenience if users can preview files in browser window before downloading.

      Thanks.

      • angela's avatar
        angela
        Catalyst II

        I am not sure if there are currently much Aras employees monitoring this forum. Must of the time forum members help themselves already, so they had become a little bit too laid back.

        What will happen if you change the last mimeType setting in the vault.config from attachment to inline? Will it then open the file in the browser?

        <mimeType value="*">
        <headers>
        <add name="Content-Disposition" value="attachment"></add>
        </headers>
        </mimeType>

        This one is the setting used for each unspecified file type. 

        If this works and the pdf (but of course also each other file) will be opened, than I think I know the reason. It´s chrome itself.

        Check out this one:

        ----

        https://groups.google.com/a/chromium.org/g/blink-dev/c/bbxAGu90LgM/m/aKNlwPAMAQAJ

        Summary

        With the removal of Flash, there is no longer the need to return anything for navigator.plugins and navigator.mimeTypes. These APIs were used primarily for a) probing for Flash player support, or b) fingerprinting. As such, we'd like to return empty for these two properties. Gecko already switched to returning *only* Flash starting with Firefox 52, and returning empty as of Firefox 85.

        ----

        Maybe we can find a solutions similar to the one used for SAP:

        https://blogs.sap.com/2016/02/13/display-pdf-in-sapui5-prevent-from-downloading/

        --

        Other hints from SAP community:

        https://github.com/SAP/openui5/issues/3007

        https://github.com/SAP/openui5/issues/3152

  • Out of interest: Has anyone asked Aras support about this one already?

    • schauhan's avatar
      schauhan
      Ideator III

      This is still an unresolved issue as far as I know.

      -Sam

      • angela's avatar
        angela
        Catalyst II

        Ah ok. I have seen a couple of similar discussions in this forum so I definitely think that there are many persons who would love to have solution for this one.

        Anyway, I made a ticket. Let´s hope there is a solution.

  • Hi community,

    I got feedback from support and it turned out that this one is a know bug fixed in Innovator 12SP10. I tested it out in a test environment and can confirm that it was fixed. There is no official patch available, so if you are free-users I cannot tell what they exactly changed. I have seen nothing obvious in the relevant files. 

    Hope this helps!

    Angela

    • schauhan's avatar
      schauhan
      Ideator III

      Hi Angela,

      Thanks for following up on this.  I guess we will have to just wait for next open release.

      -Sam

    • Ambuj's avatar
      Ambuj
      Ideator II

      Do they have any hotfix which can be downloaded?

      Ambuj

    • I have a same problem. Aras 11sp12 can view pdf online but with Aras 12sp9, the pdf file is downloaded, I have to tried edit vault.config, web.config but not succeeded. talktowendys surveyzop