I was wondering what I would need to do to make a link, when clicked, download an image with the save as window, instead of just loading the image inside the browser.
I don't want to have to right click the link & click save as,
and I don't want to have to zip the file.
I originally posted this in the HTML section, and was told to post here - http://bytes.com/forum/thread790863.html 3 2347 pronerd 392
Recognized Expert Contributor
You would want to change the HTTPResponse mime type to be a nonsense value like "applicatio n/download" or "applicatio n/unknown". This is not something you would do with JavaScript. It would have to be done with a server side language, or with the configuration of your web server.
You would want to change the HTTPResponse mime type to be a nonsense value like "applicatio n/download" or "applicatio n/unknown". This is not something you would do with JavaScript. It would have to be done with a server side language, or with the configuration of your web server.
I'll post this in the PHP section then?
thanks
rnd me 427
Recognized Expert Contributor
in firefox, you could save the images as uncompressed png images. these could be opened using a weird mime type like mentioned above, but with the data being hosted by the client using a data URL. using the canvas tag provides an interface to the image data in firefox and opera.
would this code be of use you you?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Kevin Muenzler, WB5RUE |
last post by:
How do I force a browser to download a file instead of displaying it? In
other words I have a page with MP3 and WMA files on it and I would like for
the visitor to download the file instead of play it without having to
right-click and save.
How can I force the browser to pop up the "save file as" dialog box instead
of playing it? I know that I can encapsulate it in a zip file which will
download and open WinZip.
Thanks
|
by: Frances Del Rio |
last post by:
I have a bunch of Photoshop images on my server, I want when user clicks
on a link to a Photoshop img for it to start downloading (like when you
click on a Word file..) how can I do that? thank you.. Frances
|
by: w33nie |
last post by:
I was wondering what I would need to do to make a link, when clicked, download an image with the save as window, instead of just loading the image inside the browser.
I also don't want to have to right click the link & click save as
|
by: w33nie |
last post by:
I was wondering what I would need to do to make a link, when clicked, download an image with the Save As dialog box, instead of just loading the image inside the browser.
I know that MIME edit would be able to do this for my browser, but I want it scripted into my web site, because I can't tell all of my users to edit their browser's settings
I don't want to have to right click the link & click save as,
and I don't want to have to zip the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |