# Need help saving a jpg via flash but not via browser

**URL:** https://forum.kirupa.com/t/need-help-saving-a-jpg-via-flash-but-not-via-browser/29234
**Category:** flash
**Created:** [August 24, 2003, 5:04pm UTC](https://forum.kirupa.com/t/need-help-saving-a-jpg-via-flash-but-not-via-browser/29234 "2003-08-24T17:04:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![neoBinary](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@neoBinary](https://forum.kirupa.com/u/neoBinary)
#### Post date: [August 24, 2003, 5:04pm UTC](https://forum.kirupa.com/t/need-help-saving-a-jpg-via-flash-but-not-via-browser/29234/1 "2003-08-24T17:04:03Z")

</div>

hello,

trying to work out whether there’s a way to save a pic from within a flash photo gallery i’m working on. i’m trying to create an effect that is similar to right clicking in a browser on a pic and then selecting “Save Picture As…”.

anyone got any ideas?

thanx

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 24, 2003, 5:49pm UTC](https://forum.kirupa.com/t/need-help-saving-a-jpg-via-flash-but-not-via-browser/29234/2 "2003-08-24T17:49:55Z")

</div>

I dont think thats possible unless you zip the jpg and use the getURL action.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 24, 2003, 5:55pm UTC](https://forum.kirupa.com/t/need-help-saving-a-jpg-via-flash-but-not-via-browser/29234/3 "2003-08-24T17:55:44Z")

</div>

that’s what i was thinking, though i have an array of pics. sure wish there was a way without using getURL.

i’m wondering if i could have a module in php compress the required jpg on the fly and then have getURL link to the zip instead?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 24, 2003, 7:07pm UTC](https://forum.kirupa.com/t/need-help-saving-a-jpg-via-flash-but-not-via-browser/29234/4 "2003-08-24T19:07:35Z")

</div>

Here you go 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 24, 2003, 7:50pm UTC](https://forum.kirupa.com/t/need-help-saving-a-jpg-via-flash-but-not-via-browser/29234/5 "2003-08-24T19:50:49Z")

</div>

eyezberg

just what i needed 🙂

didn’t think about passing the jpg url’s as variables via js

nice one, this has helped a lot!

this forums fast 🙂 back soon! i must return the favour

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 25, 2003, 4:54am UTC](https://forum.kirupa.com/t/need-help-saving-a-jpg-via-flash-but-not-via-browser/29234/6 "2003-08-25T04:54:55Z")

</div>

just discovered a serverside way of doing this with raw http headers by using the header() php function. the following as calls the rename.php file that follows the as below:

```auto
save_btn.onRelease = function() {
	pass_pic_path = history_sequence_array[index_selection];
	getURL("rename.php?file=" + pass_pic_path);
	tip("");
};

```

```php
<?
$file = $_GET['file'];
header("Content-Type: image/jpeg");
header ("Content-disposition: attachment; filename=".$file.";");
header("Content-Length: ".filesize($file));
readfile($file);
exit;
?>

```

this works a treat. now to use this process with a right click context menu, any ideas?

this flash beats java any day? 🙂 why didn’t i get into flash sooner

been searching through some of the posts here today, top place!
