# Sending URLVariables with FileReference.upload()

**URL:** https://forum.kirupa.com/t/sending-urlvariables-with-filereference-upload/228330
**Category:** flash
**Created:** [June 6, 2007, 11:30pm UTC](https://forum.kirupa.com/t/sending-urlvariables-with-filereference-upload/228330 "2007-06-06T23:30:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![blulightJR](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@blulightJR](https://forum.kirupa.com/u/blulightJR)
#### Post date: [June 6, 2007, 11:30pm UTC](https://forum.kirupa.com/t/sending-urlvariables-with-filereference-upload/228330/1 "2007-06-06T23:30:18Z")

</div>

I’m attempting to send URLVariables along with my FileReference.upload(). However, my PHP script is not receiving the data I’ve sent along with my URLVariables object. A snippet of my code is below. Any ideas? I appreciate any help in advance.

var fileReference:FileReference = new FileReference();  
var request:URLRequest = new URLRequest( “/assets/upload.php” );

var variables:URLVariables = new URLVariables();  
variables.file\_name = “myFile.jpg”;

request.data = variables;

request.method = URLRequestMethod.POST;

fileReference.upload( request );

---

<div class="post-metadata">

### Author: ![anroy](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@anroy](https://forum.kirupa.com/u/anroy)
#### Post date: [May 23, 2008, 2:40pm UTC](https://forum.kirupa.com/t/sending-urlvariables-with-filereference-upload/228330/2 "2008-05-23T14:40:37Z")

</div>

You should use an HTTP debugger like HttpWatch, or Fiddler HTTP Debugger to inspect the body of the POST data being sent.

I find that is usually how I find my POST data errors.
