Skip to content

Commit

Permalink
fix: download url
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-elimu committed Dec 1, 2024
1 parent 9724b9c commit 9358666
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ public void run() {
if (!imageFile.exists()) {
// Download file bytes
BaseApplication baseApplication = (BaseApplication) getActivity().getApplication();
String downloadUrl = baseApplication.getBaseUrl() + imageGson.getBytesUrl();
String downloadUrl = imageGson.getBytesUrl().startsWith("http")
? imageGson.getBytesUrl()
: baseApplication.getBaseUrl() + imageGson.getBytesUrl();
Log.i(getClass().getName(), "downloadUrl: " + downloadUrl);
byte[] bytes = MultimediaDownloader.downloadFileBytes(downloadUrl);
Log.i(getClass().getName(), "bytes.length: " + bytes.length);
Expand Down

0 comments on commit 9358666

Please sign in to comment.