rookie0 / nextcloud-sharing-path

🌩 Nextcloud app to enhance files sharing to be accessed by stored path, can be used as CDN origin.
GNU Affero General Public License v3.0
47 stars 11 forks source link

[feature] request that the prefix can be customized in the settings. #28

Closed medivh-jay closed 3 years ago

medivh-jay commented 3 years ago

Expect to add a setting function to replace https://youre-domain/nextcloud/apps/sharingpath/username/ when copying, For example, https://youre-domain/nextcloud/apps/sharingpath/username/a.jpg, after the custom prefix is https://oss.domian.com/, the copied path is https://oss.domian.com/a.jpg

GeneriumMadness commented 3 years ago

Imagine that you have 2 users and they has opened access to the file "a.jpg". Which one file will be selected when you will follow the link?

rookie0 commented 3 years ago

I'm agree with @GeneriumMadness, there maybe can add an admin setting like Sharingpath copy prefix for the host part https://oss.domian.com, but can not ignore the username.

Or you can add an nginx(apache...) rewrite rule for some special user. @medivh-jay

medivh-jay commented 3 years ago

Yes, I did use nginx rewrite, because I think this setting belongs to the user setting, not the system setting. If multiple users use it, they can choose to perform their own nginx rewrite operation on their own path containing the username.
image

rookie0 commented 3 years ago

@medivh-jay Got it, will do.

medivh-jay commented 3 years ago

Thank you very much for your contribution image

rookie0 commented 3 years ago

@medivh-jay v0.4.0 - nightly Please take a look.

medivh-jay commented 3 years ago

@rookie0 AWESOME! Thank you very much for your changes to this feature. this provides great convenience. sharingpath