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

API Config Site Returns Non-Encoded Image_Header URL #1635

Closed
dalezak opened this issue Mar 13, 2017 · 2 comments
Closed

API Config Site Returns Non-Encoded Image_Header URL #1635

dalezak opened this issue Mar 13, 2017 · 2 comments

Comments

@dalezak
Copy link

dalezak commented Mar 13, 2017

Expected behaviour

The /api/v3/config/site endpoint is returning non-encoded image_header, which is causing some issues in the mobile app.

Actual behaviour

Some Deployment image_header include whitespace in the URL.

Steps to reproduce the behaviour/error

With a valid access_token, hitting https://USAelectionmonitor.api.ushahidi.io/api/v3/config/site returns:

"image_header": "https://74ddb495e3f187ded630-0b4c691ea14dad11384ab079da46af4f.ssl.cf2.rackcdn.com/usaelectionmonitor.api.ushahidi.io/5/8/5810e52688ec4-round simple on light.png"

Which includes whitespace in the image URL, but probably should instead return

https://74ddb495e3f187ded630-0b4c691ea14dad11384ab079da46af4f.ssl.cf2.rackcdn.com/usaelectionmonitor.api.ushahidi.io/5/8/5810e52688ec4-round%20simple%20on%20light.png

Perhaps a solution is for the image uploader should sanitize the file URLs before it is saved?

@dalezak dalezak changed the title API Config Site Returns API Config Site Returns Non-Encoded Image_Header URL Mar 13, 2017
@rjmackay rjmackay added the Bug label Mar 20, 2017
@jshorland jshorland added Q2 OKR and removed Q2 OKR labels Apr 12, 2017
@rjmackay
Copy link
Contributor

@crcommons you could look at this as a first issue in the API. This should be a change needed in the Media Formatter class somewhere. Have a look around, and then I can give you a run through of how that various parts fit together

@rjmackay
Copy link
Contributor

@dalezak could you test this against a staging deployment? ie. (qa.ushahididev.com)

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

5 participants