Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Mallikarjun_M_
Beginner
116 Views

Image download

 

In listview, i am displaying image and link  <a href="'+imageURL+'" download>Save</a>  to download image ,

On click of save in emulator image is getting downloaded, After installing in phone the link is not responding and the image is not getting downloaded. 

Below is the code for reference:

el = document.getElementById('thelist');

 li = document.createElement('li');

 li.innerHTML='<br/><center>'+

  '<div id="divContainerID" class="divContainer">'+
 '<div class="divTitle">'+feed.items.title+'</div>'+
  '<div class="divImg"><img src="'+feed.items.media.m+'" height="auto"  width="100%" /></div>'+
    '</div><div class="divFooter"> <div class="divFooter"><a href="'+feed.items.media.m+'" download>Save</a></div><br/></div><br/></center>'
 el.appendChild(li, el.childNodes[0]);

Tags (2)
0 Kudos
7 Replies
Diego_Calp
Valued Contributor I
116 Views

Hi,

Could you give an example of the final url to download the image? What is placed in feed.items.media.m when running?

Regards,

Diego

Mallikarjun_M_
Beginner
116 Views

Hi, 

Here it is : http://farm8.staticflickr.com/7666/26760451752_84ed224ca1_m.jpg

The url differs for every li in listview

Regards , 

M

 

Diego_Calp
Valued Contributor I
116 Views

Did you configure the whitelisting? Projects / Build Settings / Whitelist

Mallikarjun_M_
Beginner
116 Views

Hi, 

What should I configure? I have not touched this section . 

What should I configure for url like : http://farm8.staticflickr.com/7666/26760451752_84ed224ca1_m.jpg

 

Attached is the screen shot for reference

 

 

PaulF_IntelCorp
Employee
116 Views

Mallikarjun -- follow the instructions and links in the info icons -- the (i) icons...

Mallikarjun_M_
Beginner
116 Views

 

Sorry Paul, I didn't get it. Please brief it

PaulF_IntelCorp
Employee
116 Views

Reply