Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to config Glide for download image file with Bearer token Authentication?

I want to download image from authentication API. How to download config Glide?

GlideUrl glideUrl = new GlideUrl(url,
new LazyHeaders.Builder()
    .addHeader("Authorization", token)
    .build());

GlideApp.with(context) 
        .load(glideUrl)
         .into(imageView);
like image 229
Ahmad Aghazadeh Avatar asked Sep 21 '25 10:09

Ahmad Aghazadeh


1 Answers

Use .addHeader("Authorization", "Bearer " + token) instead.

like image 134
devgianlu Avatar answered Sep 22 '25 23:09

devgianlu