# XML POST / Upload, Flash uploaders and all that

**URL:** <https://www.ruby-forum.com/t/xml-post-upload-flash-uploaders-and-all-that/171153>\
**Category:** Rails\
**Created:** [June 27, 2009, 2:35am UTC](https://www.ruby-forum.com/t/xml-post-upload-flash-uploaders-and-all-that/171153 "2009-06-27T02:35:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zamo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/4af34b/32.png) [@zamo](https://www.ruby-forum.com/u/zamo)\
**Post date:** [June 27, 2009, 2:35am UTC](https://www.ruby-forum.com/t/xml-post-upload-flash-uploaders-and-all-that/171153/1 "2009-06-27T02:35:16Z")

</div>

Hello everybody,

I’m having some trouble with my latest endeavor : POSTing a XML File to  
my Rails App. I use a flash Uploader, namely FancyUpload v2.0 (v3.0  
stopped working for me for very random reasons) to POST the data to  
Rails. Here’s the response I get :

Processing MyController#upload\_xml (for 127.0.0.1 at 2009-06-27  
02:22:22) [POST]  
Session ID: ed3cea2a21aca4e3b293e6fd2cb1b6ed  
Parameters: {“Filename”=\>“instance.xml”, “Upload”=\>“Submit Query”,  
“Filedata”=\>#ActionController::UploadedStringIO:0x6489e7c}  
Completed in 2ms (View: 0, DB: 1) | 406 Not Acceptable  
[[http://www.tester.eu/uploadXML](http://www.tester.eu/uploadXML)].

I connected the route as such :  
map.connect ‘uploadXML’, :controller =\> “My”, :action =\> “upload\_xml”

It seems that it’s rejecting the file from the get-go, I’ve checked out  
[Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/activeupload/issues/detail?id=2) and it seems to  
have something to do with the HTTP Headers, -Accept and all that jazz.

I tried using Live HTTP Headers, the request isn’t sent there, no luck.  
Also tried Wireshark but it kept capturing LAN noise and no browser  
requests whatsoever.

There’s something wrong with the MIME Types from the request, while  
doing picture upload (this works) using the same JS/Flash etc. solution,  
everything is ok except the MIME Type, gets application/octet-stream all  
the time. I worked something out in the past to make it look for the  
MIME type off of the extension but that doesn’t seem the case here.

I must say that I’m running Apache as a proxy in front of Mongrel (to  
test HTTPS), currently in development mode - could that also be a cause  
?

I’m stumped trying to figure it out for the past 2 hours now, I’m gonna  
try and switch to the newer FancyUpload v3.0, perhaps my luck has  
changed and it’s working for me again. Or another Flash upload solution,  
who knows.

Anxiously awaiting any replies, can provide more details if needed, of  
course.

Thank you in advance !

---

<div class="post-metadata">

**Author:** ![zamo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/4af34b/32.png) [@zamo](https://www.ruby-forum.com/u/zamo)\
**Post date:** [June 27, 2009, 2:40am UTC](https://www.ruby-forum.com/t/xml-post-upload-flash-uploaders-and-all-that/171153/2 "2009-06-27T02:40:33Z")

</div>

Scratch that, it was actually getting to the controller, just didn’t see  
it in the console, gosh. So all swell, just remembered that 406 would be  
thrown even if the upload worked (with pictures and all). Darn tired  
eyes ! 🙂 Thank you anyway !
