# Using relative reference with '.download'

**URL:** <https://forum.kirupa.com/t/using-relative-reference-with-download/311335>\
**Category:** Uncategorized\
**Created:** [July 3, 2010, 3:15am UTC](https://forum.kirupa.com/t/using-relative-reference-with-download/311335 "2010-07-03T03:15:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)\
**Post date:** [July 3, 2010, 3:15am UTC](https://forum.kirupa.com/t/using-relative-reference-with-download/311335/1 "2010-07-03T03:15:24Z")

</div>

Does anyone know a way to use a relative reference with the download?  
I would be surprised if only absolute references will work but I can’t find a solution.

This code just gives me this error (as expect by the live docs)  
Error #2039: Invalid remote URL protocol. The remote URL protocol must be HTTP or HTTPS.

```auto
trace(s);//someFile.pdf			
var downloadURL:URLRequest= new URLRequest(s);
var fileName:String=s;
var file:FileReference= new FileReference();
file.download(downloadURL, fileName);

```

livedoc ref here:  
[http://help.adobe.com/en\_US/AS3LCR/Flash\_10.0/flash/net/FileReference.html#download()](http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/net/FileReference.html#download())

Thanks for taking the time to look at my problem.  
S.
