nextcloud / unsplash

📸🔀☁️ Random Nextcloud log in background from Unsplash
https://apps.nextcloud.com/apps/unsplash
GNU Affero General Public License v3.0
92 stars 23 forks source link

May fix the "Nextcloud Image" provider (currently not working) #119

Closed Jerome-Herbinet closed 1 year ago

Jerome-Herbinet commented 1 year ago

Signed-off-by: Jérôme Herbinet 33763786+Jerome-Herbinet@users.noreply.github.com

On Nextcloud instances, including mine, the default background images are in the "/apps/theming/img/background" folder but not in the "/apps/theming/image/background" folder. I assume that this could fix this provider.

newhinton commented 1 year ago

Which version of Nextcloud are you running?

I am using "Nextcloud Image" aswell, but with the apps/theming/image/background-path. It works for me.TM (Version 25)

Jerome-Herbinet commented 1 year ago

Which version of Nextcloud are you running?

I am using "Nextcloud Image" aswell, but with the apps/theming/image/background-path. It works for me.TM (Version 25)

Currently, 25.0.4

newhinton commented 1 year ago

The thing is, according to the routes in the nextcloud repository, your variant should not be working:

[
    'name' => 'Theming#getImage',
    'url' => '/image/{key}',
    'verb' => 'GET',
],

Source

The routes are calculated as follows (as far as i understand): index.php/apps/{appname}/{route}

here, that translates to: index.php/apps/theming/image/{key} with background as the key.

So according to that, my code is fine. Do you have access to your instance's code?

Jerome-Herbinet commented 1 year ago

Thanks, @newhinton, for your comment. So I think it's more complex to do than I thought ; so I prefer closing this PR for the moment.