The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Download png from link, Cannot get download of png to work with a link
Urgaan
post May 16 2018, 06:04 AM
Post #1





Group: Members
Posts: 3
Joined: 16-May 18
Member No.: 26,646



Hi all,

I've been wanting to get an export function to work on my site, which almost works perfectly, it just does not download automatically.

Currently it generates this: <a target="_blank" download="MediumRandomNewick_treemap_outer.png" href="blob:http://localhost:8080/c02ebb93-19b9-43fa-872d-b32fc02dc56f">Export</a>

But this is not clickable and also does not force the download, can anyone tell me how I would go about force downloading? Preferably with JavaScript.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Christian J
post May 19 2018, 04:07 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



I think we need more information about what the OP is doing.

- Where does the BLOB come from? If it's from a database, maybe it's simplest to convert it to a base64 data URI on the server side, and then use that for the download.

- How and where is a SVG generated, and where is it used? The OP haven't shown any code example of that.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post May 20 2018, 09:10 AM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



I read that a blob URL references an object that is in the browser's memory and not a physical file. Beats me how it, in this case, got into the memory to start with.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 03:36 AM