Navigation

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Allow file access from files

    Opera for Windows
    2
    7
    4536
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • vince42
      vince42 last edited by

      In previous versions used to be a configuration / flag to allow file access from files. After it went away, people suggested to use the command line parameter --allow-file-access-from-files like with Chromium.

      Neither of the options seems to work for me. How can I enable file access?

      Reply Quote 0
        1 Reply Last reply
      • burnout426
        burnout426 Volunteer last edited by

        Could you provide a test case? You using XHR to read file file? Is the file is the same directory (or subdirectory) as the HTML file?

        Reply Quote 0
          1 Reply Last reply
        • vince42
          vince42 last edited by

          The test case is as follows: I have a XML file with a transformation element specifying a XSL file. In Opera the screen stays blank, in Firefox the XML is rendered as expected. From my research I could exclude that there are other reasons responsible than the disallowance of local file access.

          Reply Quote 0
            1 Reply Last reply
          • burnout426
            burnout426 Volunteer last edited by

            Seems to be working fine for me on Windows 10 Pro + opera 52.0.2871.64 x64 where both files are on my desktop.

            launcher.exe --allow-file-access-from-files
            

            cdcatalog.xml:

            <?xml version="1.0" encoding="UTF-8"?>
            <?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>
            <catalog>
              <cd>
                <title>Empire Burlesque</title>
                <artist>Bob Dylan</artist>
                <country>USA</country>
                <company>Columbia</company>
                <price>10.90</price>
                <year>1985</year>
              </cd>
              <cd>
                <title>Hide your heart</title>
                <artist>Bonnie Tyler</artist>
                <country>UK</country>
                <company>CBS Records</company>
                <price>9.90</price>
                <year>1988</year>
              </cd>
             </catalog>
            

            cdcatalog.xsl

            <?xml version="1.0" encoding="UTF-8"?>
            <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <xsl:template match="/">
            <html> 
            <body>
              <h2>My CD Collection</h2>
              <table border="1">
                <tr bgcolor="#9acd32">
                  <th style="text-align:left">Title</th>
                  <th style="text-align:left">Artist</th>
                </tr>
                <xsl:for-each select="catalog/cd">
                <tr>
                  <td><xsl:value-of select="title"/></td>
                  <td><xsl:value-of select="artist"/></td>
                </tr>
                </xsl:for-each>
              </table>
            </body>
            </html>
            </xsl:template>
            </xsl:transform>
            
            Reply Quote 0
              1 Reply Last reply
            • vince42
              vince42 last edited by

              Windows 10 Pro 64 bit, Opera 52.0.2871.40, both files on my desktop, invoked as you suggested: blank screen.

              Let me guess: "Try uninstalling and reinstalling Opera" ? 🙂

              Reply Quote 0
                burnout426 1 Reply Last reply
              • burnout426
                burnout426 Volunteer @vince42 last edited by

                @vince42 said in Allow file access from files:

                Try uninstalling and reinstalling Opera" ?

                🙂 You can test in a standalone installation instead. Download the Opera installer, launch it, click "options", set "install path" to a folder on your desktop, set "install for" to "standalone installation" and install. See how it works in that Opera. If it works fine, then you know something is not quite right with your regular install/profile.

                Reply Quote 0
                  1 Reply Last reply
                • vince42
                  vince42 last edited by

                  Actually, I think, I will not undergo the effort to find out what goes wrong, when there is only a command line switch to toggle the behaviour. I rather stick to Firefox for development then. Hopefully it gets integrated in the future again.

                  Reply Quote 1
                    1 Reply Last reply
                  • First post
                    Last post

                  Computer browsers

                  • Opera for Windows
                  • Opera for Mac
                  • Opera for Linux
                  • Opera beta version
                  • Opera USB

                  Mobile browsers

                  • Opera for Android
                  • Opera Mini
                  • Opera Touch
                  • Opera for basic phones

                  • Add-ons
                  • Opera account
                  • Wallpapers
                  • Opera Ads

                  • Help & support
                  • Opera blogs
                  • Opera forums
                  • Dev.Opera

                  • Security
                  • Privacy
                  • Cookies Policy
                  • EULA
                  • Terms of Service

                  • About Opera
                  • Press info
                  • Jobs
                  • Investors
                  • Become a partner
                  • Contact us

                  Follow Opera

                  • Opera - Facebook
                  • Opera - Twitter
                  • Opera - YouTube
                  • Opera - LinkedIn
                  • Opera - Instagram

                  © Opera Software 1995-