richdocuments icon indicating copy to clipboard operation
richdocuments copied to clipboard

AppData API for settings ...

Open mmeeks opened this issue 1 year ago • 2 comments

We would like a new API extension to WOPI that lets us serialize configuration data; essentially a two layer system and then user set of settings. Discussed with @elzody

  • CheckFileInfo -> we want two directory listings: [ each with a file-name, and an opaque to us string etag (- did it change? -) ] -> one directory per system ... -> one directory per user ...

    => similar to the fonts end-point ? ... => could re-use the JSON there ? ... + JSON - name + stamp

    => implementation should use AppData + as per fonts ... => nice API for this IAppData + will give us a directory listing.

  • URLs -> to find this stuff ...

    • we get handed the URLs in CheckFileInfo => authentication token to get them ...

Fun code in: lib/Controller/DocumentController.php lib/Controller/WopiController.php

  • Links to other things in the WopiController.php response

  • We would need an end-point:

    • to up-load over existing files ...

    • create new files [!?] ...

      • so we need an end-point we can up-load / create new files over - at JSON top-level.
    • richdocuments/appinfo/routes.php -> defines the end-points.

  • Suggest we use eg. 'SettingJSON' = '{ foo }' in the CheckFileInfo ... and have URLs in there.

would use access_token for authentication for the fetch & up-load.

mmeeks avatar Sep 16 '24 15:09 mmeeks

Other bits we might need: users have a habit of corrupting their settings (somehow) - so a "restore defaults" - which just deletes all settings would be useful in the Nextcloud settings.

mmeeks avatar Sep 16 '24 15:09 mmeeks

@pedropintosilva and @juliushaertl - you'd be interested in this perhaps :-)

mmeeks avatar Sep 16 '24 15:09 mmeeks