Skip to content

Conflicting library version #1660

@susnux

Description

@susnux

Problem:
If an app uses a different version of nextcloud-upload than the files app and calls getUploader before the files app, then the global uploader might be incompatible.

So we should rethink what belongs into the library and what belongs to the server or how to make it version agnostic.
Providing the uploader class in the library is fine, but there should be no global uploader instance as this can conflict between apps and even cause issues when there are non-breaking changes, because any change on the API is then a breaking change (even additions).

I only see one feasible solution:
Do not provide a global uploader as we do currently but only allow to share the uploader queue.
This way we still have one progress for all uploads but the uploader returned by the library matches the types of the version used.

In general this is a new issue we created by having classes within libraries instead provided by Nextcloud server.


So potentially we could just proxy it like we do with eventbus. We split of the queue of the uploader and always return that uploader class that is shipped by the apps dependencies but communicate all queue related information to a global progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions