Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOCAL_UPLOADS_DIR string replacement #25458

Closed
sevmonster opened this issue May 6, 2023 · 6 comments
Closed

LOCAL_UPLOADS_DIR string replacement #25458

sevmonster opened this issue May 6, 2023 · 6 comments

Comments

@sevmonster
Copy link

I'd like to use Nextcloud as my file storage solution backend for Zulip. The easiest and fastest solution for that, without worrying about API integration or anything, would be to allow username replacements in the LOCAL_UPLOADS_DIR value. Is this a feasible idea or would deeper integration be necessary?

This functionality would allow me to replace Nextcloud Talk with Zulip.

@zulipbot
Copy link
Member

zulipbot commented May 8, 2023

Hello @zulip/server-misc members, this issue was labeled with the "area: uploads" label, so you may want to check it out!

@timabbott
Copy link
Member

Hmm, can you talk about the use case for why you don't just want to use a single storage directory for the entire Zulip server? It's certainly a lot simpler to do that.

I think in theory it would be possible to do something like what you want; but it seems like a bother that would complicate the relevant code paths, and in particular integrating the Zulip<=>NextCloud username lookup part could be pretty messy, so I think one would only want to do that if it's important.

@sevmonster
Copy link
Author

In Nextcloud Talk (and in previous versions of RocketChat/NC where their integration still worked), uploading an attachment meant uploading it to Nextcloud, with all the benefits that entailed. I am not hoping or planning for a particularly intelligent implementation; I am using SSO with single source of truth, so usernames match in both systems, making any checks unnecessary. In my specific use-case, there would be no need for any extra implementation or overhead, just prepending the username and a slash to the save path. And maybe removing some of the initial path elements to make it more user manageable.

@timabbott
Copy link
Member

I guess the thing I worry about with that approach is that moving the files with NextCloud would break the links to the file in Zulip, which might not at all be obvious to the user.

I still don't understand the benefit/goal here -- is it that the user can find the files they've uploaded to Zulip within the Nextcloud? Is to be able to track their Zulip file uploads against a NextCloud quota?

@sevmonster
Copy link
Author

The goal is just to integrate and consolidate, to have a single source for user files. One of the reasons I adopted Nextcloud + Nextcloud Talk in the first place was because you no longer had to worry about "where did I share this file", it was just always available in one place, regardless of if you shared it in a chat room, during a meeting, or from your desktop sync.

I guess the thing I worry about with that approach is that moving the files with NextCloud would break the links to the file in Zulip, which might not at all be obvious to the user.

That is a real concern and one I didn't consider. I suppose I could make the files write protected for the Nextcloud service account so they can't be renamed, and only the Zulip account can delete, but maybe that's overkill. That issue might make the simple solution I proposed to be unworkable.

@timabbott
Copy link
Member

Closing as I don't think we have identified a clear improvement to make here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants