Closed yoann-antoviaque closed 8 years ago
Can you tell me how to test this? are we talking about user profile pictures?
yes, I was talking about user profile picture.
To test it, just install nodebb with a non empty relative_path, login and go to the user profile, change profile picture, the browser will try to download a picture from the nodebb server with path containing the configured host (or the bucket name if no host is configured).
I'm working on a patch to submit and will attached it once I can confirm the fix
I would be ok with just hard coding the https as all s3 buckets are https enabled now they were now when the plugin was originally written.
Also if you wish to push a fix thats great but please make sure to read the contribution guidelines
I've submitted a new pull request that should respect the guidelines... sorry
thanks
in https://github.com/LewisMcMahon/nodebb-plugin-s3-uploads/blob/master/index.js#L312 we can see that the host is prefixed with // to handle http and https
but nodebb, searches for http to decide if it is a relative url or not, therefore, urls are seen as relative to nodebb installation and prefixed with nodebb's path (https://github.com/NodeBB/NodeBB/blob/master/src/user/data.js#L115)
I think there should be an option to set http or https, or simply specify it in the host, that would fix this issue while still allowing both