Results 1 to 4 of 4

Thread: QWebEngineSettings allow local file write?

  1. #1
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QWebEngineSettings allow local file write?

    All,

    The documentation is a bit unclear on the settings for QWebEngine. It makes it sound like one of them will enable local file write access, which, ironically, is what we want for a self contained application. I have one of the javascript team putting together a few lines of test code, but, is this just unclear documentation? Will QWebEngine allow javascript to write to an existing file if all of the permissions and settings or correct or is the write physically blocked?

    Thanks,

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QWebEngineSettings allow local file write?

    I doubt that this is possible, more likely this needs explicit support from the host application.

    Which attribute do you refer to? LocalStorageEnabled?

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    RolandHughes (25th June 2015)

  4. #3
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QWebEngineSettings allow local file write?

    The ones for local file url access were unclear if they were read-only or read-write. One could make the case for read/write since the file was local to begin with. One could also make a case about the potential security hole. Self contained Kiosk type applications without network connections would be much easier to implement if the javascript team could read/write local data. Yes, LocalStorageEnabled would let them save a small amount of information like key-value pairs.

    It is kind of sad though. The LocalStorageEnabled stuff isn't well implemented in many browsers so we are having to write code just to do what a locally contained application should be able to do.

    Anyway, your answer is as I suspected.

    Thanks,

  5. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QWebEngineSettings allow local file write?

    LocalContentCanAccessFileUrls is almost certainly just for reading, e.g. using them in src attributes, etc.

    I doubt the engine implements post/push handlers for file URIs at all (which is the only available "write" API in a browser's context AFAIK)

    Cheers,
    _

Similar Threads

  1. how to update a local file at runtime
    By xyjian in forum Newbie
    Replies: 4
    Last Post: 4th March 2011, 06:27
  2. local file path
    By sky in forum Newbie
    Replies: 3
    Last Post: 20th January 2011, 08:59
  3. Replies: 1
    Last Post: 22nd December 2010, 17:56
  4. Replies: 2
    Last Post: 2nd November 2010, 05:15
  5. Password on local file/folder
    By icebox25 in forum Qt Programming
    Replies: 3
    Last Post: 13th April 2007, 16:33

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.