NastuzziSamy / files_external_gdrive

[BETA - UNSTABLE] GDrive external storage for NextCloud
GNU Affero General Public License v3.0
79 stars 23 forks source link

gdrive.js does not load when installed in a custom app directory #2

Closed simonbru closed 5 years ago

simonbru commented 6 years ago

Nextcloud documentation recommends using a second, writable directory for apps installed by users. The Nextcloud docker image automatically configures the custom_apps for this purpose. However in my case gdrive.js does not load when files_external_gdrive is installed in custom_apps. The server returns a weird 302 redirect for gdrive.js when opening /settings/admin/externalstorages in the browser, and Nextcloud logs the following:

Debug | files_external | Could not find resource file "/apps/files_external/js/../../files_external_gdrive/js/gdrive.js"

Copying files_external_gdrive into the apps folder temporarily works around the issue (which is fine for a one time setup).

I guess this is more an issue of files_external_gdrive being in a different apps folder than files_external. I noticed the exact same issue with files_external_dropbox.

Nextcloud version: 13.0.2 using the 13.0-apache docker image

NastuzziSamy commented 6 years ago

Hi again,

Could you try this https://github.com/NastuzziSamy/files_external_gdrive/tree/patch%232 and tell me if it resolves something ?

Thanks

simonbru commented 6 years ago

Hi, this patch does not seem to fix the issue, I now get the following error: Could not find resource file "/apps/files_external/js//files_external_gdrive/js/gdrive.js"

Thanks for your work and reactivity !

simonbru commented 6 years ago

I found a solution that seems to work when the app is in any folder. However I don't know how correct or clean it is. https://github.com/simonbru/files_external_gdrive/commit/4151baeca448197130d6afdc80a12eadb499530f

NastuzziSamy commented 6 years ago

Hi @simonbru, I think it cant be cleaner.

Do not hesitate to PR ;)

simonbru commented 6 years ago

Done https://github.com/NastuzziSamy/files_external_gdrive/pull/11 :)