user7378606
user7378606

Reputation:

Download Multiple Images with ahref as Zip in jquery

Iam working with dicom images using dcm4che.
Iam setting wado request to ahref in order to download the images but iam not getting it.

This is my html code with wado request:

 <a class="myFile" href="http://xxxxx/wado?requestType=WADO&amp;studyUID=1.2.840.113704.1.111.6028.1515205296.94&amp;seriesUID=1.2.840.113704.1.111.3616.1515205367.2&amp;objectUID=1.2.840.113704.1.111.8164.1515205401.69892" download="download.jpeg"></a>
 <a class="myFile" href="http://xxxxx/wado?requestType=WADO&amp;studyUID=1.2.840.113704.1.111.6028.1515205296.94&amp;seriesUID=1.2.840.113704.1.111.3616.1515205367.2&amp;objectUID=1.2.840.113704.7.1.1.8556.1515205401.2"></a>
 <a class="myFile" href="http://xxxxx/wado?requestType=WADO&amp;studyUID=1.2.840.113704.1.111.6028.1515205296.94&amp;seriesUID=1.2.840.113704.1.111.3616.1515205367.2&amp;objectUID=1.2.840.113704.7.1.1.912.1515205428.1"></a>  

This is my Jquery Code:

var a=document.getElementsByClassName('myFile');
a.setAttribute('download', 'download.jpeg');
a.click();

I need to download all ahref link as in zip...

Can anyone solve my problem???

Upvotes: -1

Views: 278

Answers (1)

aenugula karthik
aenugula karthik

Reputation: 359

Try With this:

var i;
for(i=0;i<$('.myFile').length;i++){
   var a=document.getElementByClassName('.myFile')[e];
   a.setAttribute('download','download.jpeg');
   a.click();
 }

Upvotes: 0

Related Questions