crux-bphc / CMS-Android

A custom Moodle app for the students of BITS Pilani, Hyderabad Campus.
MIT License
28 stars 39 forks source link

Profile pictures aren't fetched properly #324

Closed abhijeetviswa closed 3 years ago

abhijeetviswa commented 3 years ago

URL to profile pictures have the format <domain>/pluginfile.php/.../user/icon/.... Navigating to this url with in an unauthenticated session results in a redirect to a default image. To properly fetch the user picture, the following url has to be used: <domain>/webservice/pluginfile.php/...&token=<web-service-token> i.e the we need to prepend webservice to the path part in the URL. We also need to pass the web service token as a a GET parameter. This is similar to how resource module files are downloaded.