خرید بک لینک

Vote count: 0

I want to implement an auto download functionality in browser from s3. I am currently using an anchor tag(created on the fly using javascript) using the following code

var link = document.createElement("a");
      link.download = name;
      link.href = file;
      if(callback) callback();
      link.click(function(){
        document.body.removeChild(link);
      });

But this approach does not work in safari because instead of downloading the file, it opens it in the browser(pdf file) and hence prevents the actual html to be rendered. I researched and found that safari does not implement the download tag of html5. Is there another way to download files in the browser. Or any s3 SDK available to do the same?

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 19 خرداد 1395 ساعت: 18:09

صفحه بندی