Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Image download

Mallikarjun_M_
Beginner
1,349 Views

 

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]);

0 Kudos
7 Replies
Diego_Calp
Valued Contributor I
1,349 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

0 Kudos
Mallikarjun_M_
Beginner
1,349 Views

Hi, 

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

The url differs for every li in listview

Regards , 

M

 

0 Kudos
Diego_Calp
Valued Contributor I
1,349 Views

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

0 Kudos
Mallikarjun_M_
Beginner
1,349 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

 

 

0 Kudos
PaulF_IntelCorp
Employee
1,349 Views

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

0 Kudos
Mallikarjun_M_
Beginner
1,349 Views

 

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

0 Kudos
PaulF_IntelCorp
Employee
1,349 Views
0 Kudos
Reply