Skip to content

Move files app to use WebDAV instead of custom PHP endpoints #12353

Closed

Description

@PVince81

Currently we have at least two endpoints to manage files:

  1. WebDAV
  2. Private PHP ajax endpoints in the files app

To reduce code duplication and endpoint duplication one idea would be to make the files app use the WebDAV endpoint instead, just like any other external client does (mobile, desktop, etc)

An existing JS library could be used (for example: https://github.com/sara-nl/js-webdav-client) by the files app.

We need to make sure that every custom property (ex: "icon", "isPreviewAvailabe", etc) is available on the WebDAV endpoint to keep the existing functionality working.

There might be other challenges like batch file deletion, where the JS code would need to send multiple "DELETE" calls, one for every selected file, instead of deleting a series of files in one call.

@DeepDiver1975 @icewind1991

Activity

  1. dragotin commented on Nov 21, 2014

    @dragotin
    Contributor

    Yes.

    We will see speed issues. But we can fix these, and each fix will also improve the clients. which in turn will improve the overall ownCloud experience. From my POV this is a good step towards a more unified development of all parts.

    About the specific batch problem you mentioned: I highly suggest that we add batch deletes and maybe other operations like move because that is a problem for the clients as well.

  2. PVince81 commented on Nov 21, 2014

    @PVince81
    ContributorAuthor

    @icewind1991 also raised a concern that IE8 might not support verbs like PROPFIND, etc. But we can have some tests about that.

  3. PVince81 commented on Nov 21, 2014

    @PVince81
    ContributorAuthor

    On a side-note I'd also love if ownCloud itself could get rid of internal ajax APIs and only rely on OCS public APIs (some kind of dogfooding).

  4. PVince81 commented on Feb 4, 2015

    @PVince81
    ContributorAuthor

    The public page can then use the "public.php/webdav" endpoint for public link file operations (#6635)

  5. PVince81 commented on Feb 4, 2015

    @PVince81
    ContributorAuthor

    Note that moving to WebDAV will also have the advantage to automatically use part files internally and solve concurrency issues like #13755

  6. PVince81 commented on Feb 4, 2015

    @PVince81
    ContributorAuthor

    Changing the whole file UI is a big task, so this should rather be done step by step:

  7. PVince81 commented on Feb 4, 2015

    @PVince81
    ContributorAuthor
    • read quota/available space value from the list PROPFIND instead of using "getstoragestats.php"
  8. added this to the backlog milestone on Feb 4, 2015
  9. PVince81 commented on Feb 4, 2015

    @PVince81
    ContributorAuthor

    @DeepDiver1975 I'm not sure whether there's time for this in 8.1, but as said above we can split it in smaller pieces.

  10. PVince81 commented on Feb 4, 2015

    @PVince81
    ContributorAuthor
    • make sure upload still works in IE8 (it might be using a workaround for uploads)
  11. PVince81 commented on Feb 4, 2015

    @PVince81
    ContributorAuthor

    Got some ideas: currently the JS code for the file list is still quite ugly and it would bring some advantages to move the file handling logic to a separate class/API anyway.
    Introducing the JS Files API: #13905

    It could be written to be based directly off WebDAV and can be injected and used by JS apps too to access files. This way we not only gain the advantage of having the files web UI based on WebDAV, but also any app that needs access/manipulate files from JS.

    So the first step would be to first design and write that new JS Files API class, which itself can use/wrap a WebDAV library.

    Then the files web UI can be ported progressively to use that JS Files API.

  12. PVince81 commented on Feb 10, 2015

    @PVince81
    ContributorAuthor

    Anoter challenge:

  13. modified the milestones: , backlog on Mar 2, 2015
  14. 31 remaining items

  15. MTRichards commented on Sep 18, 2015

    @MTRichards
    Contributor

    Yep, thank you.

  16. PVince81 commented on Nov 23, 2015

    @PVince81
    ContributorAuthor

    Not fully done, upload is still t obe done.

  17. PVince81 commented on Nov 23, 2015

    @PVince81
    ContributorAuthor

    also downloading as zip, etc. Keeping this ticket open.

  18. dragotin commented on Nov 23, 2015

    @dragotin
    Contributor

    yeah!!! ☀️

  19. PVince81 commented on Nov 23, 2015

    @PVince81
    ContributorAuthor

    but no upload or download as zip yet (not wanting to darken the mood)

  20. karlitschek commented on Nov 23, 2015

    @karlitschek
    Contributor

    Awesome :-)
    Gret work @PVince81 and everyone!

  21. lock commented on Aug 7, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  22. locked as resolved and limited conversation to collaborators on Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions