Is it the code or the browser

i don't use this application often, but it has worked previously within the last month.  However now my cffile is ALWAYS translating mime type to "application/x-itunes-itlp" even though it is sometimes a pdf, sometimes a word doc, sometimes an excel file etc.
My <form> tag has enctype="multipart/form-data"
The error is being thrown on the following line of code:
<cffile action="upload" fileField="docUpload" destination="#dirPath#" nameConflict="overwrite" result="fileUpload" accept="application/vnd.ms-word, application/msword, application/vnd.ms-powerpoint, text/plain, application/x-pdf, application/pdf, application/vnd.wordperfect, application/vnd.ms-excel, application/zip, application/x-zip, application/x-zip-compressed, application/octet-stream, application/x-compress, application/x-compressed, multipart/x-zip">
and the error, no matter what file so far (except text files) is:
The MIME type of the uploaded file application/x-itunes-itlp was not accepted by the server.
My question: who decides what mime type a file has?  is it the browser or the cffile tag?  If it's the browser, which i'm starting to suspect, is it something i can change in my own browser? (I have both firefox 3.5.7 and IE 6) if it's the cffile tag, can i change how it behaves?

OK.  So i never found a good solution, although Adam's suggestions help find the problem, the solution may not be within my means, what i did find out was that  every file uploaded from this machine (and this machine only) to any server running my code is being identified at some point as an itunes/ipl file.  I'll be glad to find out where the problem was as i checked this computer's registry and it appeared to be correct, but didn't know how to see whether it was the browser or the server after that.
I removed "accept" from the call and then ran the following code (which modifies the structure created by cf, see my note above) if the file extension matched my pre-arranged set of file extensions and threw an error if it did not (I did this is because i'm actually storing the mime type for when i output it, not because a filter that rejects by file extension didn't work for me)
NOTE: macintosh and unix users may encounter issues because of this code on files without extensions.  But they would have trouble with most  measures as they are all based on file extension and thankfully, all of my admin users uploading documents are inside my firewall and i know they have windows pcs.
Code: (note fileUpload is the variable created by cffile)
<cfif fileUpload.clientFileExt eq "doc" and fileUpload.CONTENTSUBTYPE NEQ "msword">
    <cfset fileUpload.CONTENTSUBTYPE = "msword">
    <cfif fileUpload.contenttype neq "application">
         <cfset fileUpload.contenttype = "application">
    </cfif>
</cfif>
<cfif fileUpload.clientFileExt eq "ppt" and fileUpload.CONTENTSUBTYPE NEQ "vnd.ms-powerpoint">
    <cfset fileUpload.CONTENTSUBTYPE = "vnd.ms-powerpoint">
    <cfif fileupload.contenttype neq "application">
          <cfset fileUpload.contenttype = "application">
    </cfif>
</cfif>
<cfif fileUpload.clientFileExt eq "txt" and fileUpload.CONTENTSUBTYPE NEQ "plain">
     <cfset fileUpload.CONTENTSUBTYPE = "plain">
     <cfif fileupload.contenttype neq "text">
          <cfset fileUpload.contenttype = "text">
     </cfif>
</cfif>
<cfif fileUpload.clientFileExt eq "pdf" and fileUpload.CONTENTSUBTYPE NEQ "pdf">
      <cfset fileUpload.CONTENTSUBTYPE = "pdf">
      <cfif fileupload.contenttype neq "application">
          <cfset fileUpload.contenttype = "application">
       </cfif>
</cfif>
<cfif fileUpload.clientFileExt eq "wpd" and fileUpload.CONTENTSUBTYPE NEQ "wordperfect">
       <cfset fileUpload.CONTENTSUBTYPE = "wordperfect">
       <cfif fileupload.contenttype neq "application">
           <cfset fileUpload.contenttype = "application">
       </cfif>
</cfif>
<cfif fileUpload.clientFileExt eq "xls" and fileUpload.CONTENTSUBTYPE NEQ "vnd.ms-excel">
       <cfset fileUpload.CONTENTSUBTYPE = "vnd.ms-excel">
       <cfif fileupload.contenttype neq "application">
            <cfset fileUpload.contenttype = "application">
       </cfif>
</cfif>
<cfif fileUpload.clientFileExt eq "zip" and fileUpload.CONTENTSUBTYPE NEQ "zip">
        <cfset fileUpload.CONTENTSUBTYPE = "zip">
        <cfif fileupload.contenttype neq "application">
              <cfset fileUpload.contenttype = "application">
        </cfif>
</cfif>
<cfif fileUpload.contentsubtype eq "x-itunes-itlp">
       <cfset fileupload.contentsubtype = "octet-stream">
</cfif>
The final if is effectively a catch all for this specific problem which was that it was returning "application/x-itunes-itlp", and so if going through all that stuff on code with the proper file extensions doesn't work, then there's a bug in this code, it is, however, not the best way to handle it, and i hope to have time next week to follow Adam's advice and follow up WHERE the type is being modified.
Adam, can you point to a resource explaining how to use JWS to upload files? I'm still new to the java underbelly.

Similar Messages

  • How can i download the code of the standard widgets

    Hi,
    I need to have a look at the code of standard widgets say for example LogOn Widgets. The browser developer tool isnt handy.
    How can i achieve the same.

    Hi,
    Officially, we don’t give the out-of-the box widgets code to the customers, same as we don’t provide access to the shell which renders the content.
    There are unofficial ways to access some parts of the code, like the one suggested by Yaron.
    Having say that, we do have rich set of APIs, and we are open to enhance or to guide you for the missing capabilities. Feel free to contact me directly [email protected] for specific guidance or requirement.
    Regards,
    Inbal Sabag
    Customer Success Expert | Outbound Product Management | Cloud Experience

  • HT5035 I can't seem to use the balance on my account in the itunes store without putting in the code of the original card.  This has never happened before and I don't have the original card.  Help please?

    I can't seem to use the balance left in my i-tunes account without re-entering the code from the original i-tunes gift card.  I no longer have the card.  How can I purchase music using the balance without the card?

    the code from the original i-tunes gift card is not required again once redeemed.
    Riki from bc wrote:
    I can't seem to use the balance left in my i-tunes account
    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • How can I acess my ipad content from the pc, without enter the security code on ipad? I broke the screen and it doesn´t work. theres a way to enter the code on the pc?

    how can I acess my ipad content from the pc, without enter the security code on ipad? I broke the screen and it doesn´t work. theres a way to enter the code on the pc? thank you

    No. Get it fix by making an appointment with the Apple genius bar.

  • Hey. I have received an iTunes gift card, so I was all excited, punching the code into the "redeem" option on iTunes on my iPad2; however, I kept on getting the alert, "This is not recognised as a valid code". It is very legible, though. How come?

    Hey. I have received an iTunes gift card, so I was all excited, punching the code into the "redeem" option on iTunes on my iPad2; however, I kept on getting the alert, "This is not recognised as a valid code". It is very legible, though. How come?

    The obvious answer I think is that maybe you are not entering the letters and numbers correctly. I almost never get it right the first time when I use a gift card.
    Try entering the code again - slowly and methodically. If it still doesn't work - look here for help.
    http://support.apple.com/kb/TS1292
    One final thought - if you are using a gift card that was purchased in another country - say like you have a Canada gift card and you live in the U.S. - that card will not work in the U.S. iTunes store.

  • Streamlining the code for the button group with individual links and rollover imgs

    I am looking for a solution to streamline the code for the array of 20+  buttons located inside the scroll pane.
    I know I can make an array if all the buttons would have a unified code executable change, i.e. they would become larger and brighter.
    My problem is that each button represents an product image in the lights off stage, then of rollover it is a lights on stage so I have to import two images in the on and off stage and play around with the opacity.
    Additional problem is that each button has to ling to a different label.
    My question is: is it possible to unify the code if buttons have that much individuality or I have to make each one of them as in the example below.
    // makes a hand cursor appear over a mc acting as a button for all the buttons inside the scrollpnaeBckgrnd_mc.scrollpaneBckgrnd_btns_mc.
    MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.buttonMode = true;
    MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.useHandCursor = true;
    ///////////////INDIVIDUAL BUTTONS
              MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLyte _btn.FloraLyte_ON.alpha = 0;
                        var  FloraLyte_btn_Tween:TweenLite = TweenLite.to(MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.F loraLyte_btn.FloraLyte_ON, .5, {alpha:1, paused:true});
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLyte_btn.addEventListener(MouseEvent.ROLL_OVER, overHandler_FloraLyte_btn);
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLyte_btn.addEventListener(MouseEvent.ROLL_OUT, outHandler_FloraLyte_btn);
            MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLyte_btn. addEventListener(MouseEvent.CLICK, onClick_floralytePopUp);
                      function onClick_floralytePopUp(event:MouseEvent) :void {
                                            gotoAndPlay("floralytepp");
    function overHandler_FloraLyte_btn(e:MouseEvent):void{
             FloraLyte_btn_Tween.play();
             trace("you rolled over me");
    function outHandler_FloraLyte_btn(e:MouseEvent):void{
             FloraLyte_btn_Tween.reverse();
             trace("you rolled off me");
    MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLytell_btn .FloraLytell_ON.alpha = 0;
                        var  myTween:TweenLite = TweenLite.to(MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.F loraLytell_btn.FloraLytell_ON, .5, {alpha:1, paused:true});
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLytell_btn.addEventListener(MouseEvent.ROLL_OVER, overHandler);
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLytell_btn.addEventListener(MouseEvent.ROLL_OUT, outHandler);
            MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLytell_bt n.addEventListener(MouseEvent.CLICK, onClick_floralytellPopUp);
                      function onClick_floralytellPopUp(event:MouseEvent) :void {
                                            gotoAndPlay("floralyte2pp");
              function overHandler(e:MouseEvent):void{
             myTween.play();
             trace("you rolled over me");
              function outHandler(e:MouseEvent):void{
             myTween.reverse();
             trace("you rolled off me");

    as ned suggested, plan your flow and code into it. here is one example:
    var buttonArray = [someButton, someOtherButton, aDifferentButton];
    for(var i = 0; i < buttonArray.length; i++){
         //get reference to county movieclip
         var mc = buttonArray[i];
         //then add listeners
         mc.addEventListener(MouseEvent.ROLL_OVER, overMe);
    function overMe(e:MouseEvent){
         var mc = e.target;
         switch(mc){
              case: someButton:
                       someOtherButton:   doThis();
                                                     break;
              case: aDifferentButton:     doThat();
                                                     break;
              default:                            //do nothing;
                                                     break;
    function doThis(){
         trace("do this")
    function doThat(){
         trace("do that")

  • Has anyone one else had problems redeeming the code for the free onetime download of Star Trek 2009 Movie?

    Has anyone one else had problems redeeming the code for the free onetime download of the Star Trek 2009 Movie?

    dawnfromcabot wrote:
    ITUNES HAS CHARGED MY DEBIT CARD $99.99 FOR GLOBAL WAR RIOT-SOME GAME I DID NOT KNOW WAS LOADED ON MY OTHER PHONE; HOWEVER, WHEN I PULLED UP THIS APP TO SEE EXACTLY WHAT IT WAS WAS I SURPRISED TO SEE I COULD DOWNLOAD IT FOR 'FREE'. I HAVE CONTACTED ITUNES THROUGH THIS REDICULOUSLY CHICKEN SH_T SYSTEM THEY USE SO THEY DO NOT ACTUALLY HAVE TO HEAR HOW UPSET A PERSON IS NOW THAT THEY CANNOT BUY FOOD FOR THEIR CHILDREN BECAUSE OF A MISTAKE MADE ON ITUNES PART.  I DID RECEIVE AN EMAILED RESPONSE FROM STEPHANIE WHO ADVISED THIS WAS PUCHARED ON A PHONE THAT HAS PURCHASED DOWNLOADS IN THE PAST. I WONDER IF SHE THOUGHT TO LOOK AT MY ENTIRE DOWNLOAD HISTORY AND DISCOVER THAT NOTHING HAS EVER BEEN PURCHASED ON MY ITUNE ACCOUNT IN THE AMOUNT REMOTELY CLOSE TO WHAT THEY ARE CHARGING ME NOW.  THAT IS BECAUSE I DO TRY TO MONITOR THIS ACCOUNT AND OBVIOUSLY THIS LAST PURCHASE WAS DONE WITHOUT MY KNOWLEDGE UNTIL I CHECKED MY ONLINE BANKING ACCOUNT, WHICH I DO EVERY DAY.  TO MAKE MATTERS WORSE THE APP STATES IT IS FREE TO INSTALL WHEN YOU PULL IT UP SO NO ONE HAS CLARIFIED TO MY WHERE THE $99.99 COMES INTO PLAY.  I WILL NOT DROP THIS UNTIL MY BACK ACCOUNT HAS BEEN PROPERERLY CREDITED IN THE SAME TIME FRAME IT TOOK YOU TO TAKE MY MONEY. I WILL LAUNCH A COMPLAINT WITH EVERY POSSIBLE ENTITY IN THE ITUNES COMPANY AND BUSINESSES OUTSIDE THAT REGULATE THEIR BUSINESS UNTIL THIS HAS RESOLVED IN MY FAVOR AS I AM THE ONE WHO HAS BEEN VICTIMIZED BY A COMPANY I INVITED INTO MY TELEPHONE NETWORK IN GOOD FAITH!!!!!!!!!!!!
    Reading that is giving me a headache, how about normal type.

  • TS1292 I lost itunes card is there a way to use the code on the receipt to redeem it?

    Lost itunes card is there a way to use the code on the receipt to redeem it?

    http://www.apple.com/feedback/iphone.html

  • I type in the code on the iTunes gift card but it says it has not been activated? Please help me.

    I type in the code on the iTunes gift card but it says it has not been activate? Please help.

    If  the store that you bought it from is nearby then you could try going back to it and ask them to activate it properly. If it isn't, or if they can't/won't help, then try contacting iTunes Support (you will probably need to give them images of the front and back of the card, and possibly its receipt) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then iTunes Cards And Codes

  • I scratched the label off on a £25 gift card and it removed the code. How can I get the code for the card?

    I scratched the label off on a £25 gift card and it removed the code. How can I get the code for the card?

    Click here and request assistance. Gift cards are usually if not always final sale because it would be easy enough for someone dishonest to abuse returns or replacements of them.
    (58640)

  • I brought a iTunes card and the the code on the back is not there it has faded away can u please help me with this problem

    i brought a iTunes card and the the code on the back is not there it has faded away can u please help me with this problem

    Hi Daniel ...
    Try here > iTunes Store: Invalid, inactive, or illegible codes

  • In CRM 2007 what is the code behind the Navigation bar?.

    In CRM 2007 what is the code behind the Navigation bar?.
    Jason

    It might be in component CRMCMP_NAVBAR. However, so far I have been unable to get a break point to activate. Ideally on choosing an option from the navigation bar, like Service ticket, I would like the debug session to start before call the Service Ticket component.
    This is all in the aim of trying to determine why the initial startup of the Service Ticket is so slow.
    Jas.

  • I have Photoshop CS6, Windows 7, I have no entry at the accesscode. When i will write the code into the nummeric fields. I can write only numbers, but no letters. What can I do?

    I have Photoshop CS6, Windows 7, I have no entry at the accesscode. When i will write the code into the nummeric fields. I can write only numbers, but no letters. What can I do?

    If you are talking about the serial number, as far as I know serial numbers are entirely numeric so there is no need to enter letters.  Maybe you are using the incorrect code.
    To locate the serial number:
    http://helpx.adobe.com/x-productkb/global/find-serial-number.html

  • I have a balance of $17 on my itunes but it's not allowing me to use it without re-entering the code on the back.can this be avoided?

    I have a balance of $17 on my itunes but it's not allowing me to use it without re-entering the code on the back.can this be avoided?

    Hi Arzgard,
    Thanks for visiting Apple Support Communities.
    If there is an interruption to Apple services, you can find out on this page:
    http://www.apple.com/support/systemstatus/
    If you're not able to connect to the iTunes Store, I'd recommend starting with the troubleshooting steps in this article:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Troubleshoot issues on an iPhone, iPad, or iPod touch
    If you haven't been able to connect to the iTunes Store:
    Make sure your date, time, and time zone are correct in Settings > General > Date & Time.
    Note: Time Zone may list another city in your time zone.
    Make sure that your iOS software is up to date by tapping Settings > General > Software Update (iOS 5 or later) or connecting your iOS device to iTunes and clicking Check for Update on your device's Summary page.
    Check and verify that you're in range of a Wi-Fi router or base station. If you're on a device with cellular service, make sure that cellular data is turned on from Settings > General > Cellular.
    Note: If connected to cellular data, larger items may not download. You may need to connect to Wi-Fi to download apps, videos, and podcasts.
    Make sure that you have an active Internet connection. You can check the user guide for your device for help with connecting to the Internet.
    Make sure that other devices (portable computers, for example) are able to connect to the Wi-Fi network and access the Internet.
    Try resetting (turning off and then on again) your Wi-Fi router.
    If the issue persists, try troubleshooting your Wi-Fi networks and connections.
    Regards,
    Jeremy

  • I try to connect to iTunes and it comes up with a box saying "iTunes could not connect to the iPad because it is locked with a passcode. you must enter your code on the iPad before it can be used with iTunes", but i cant enter the code on the iPad

    I try to connect to iTunes and it comes up with a box saying "iTunes could not connect to the iPad because it is locked with a passcode. you must enter your code on the iPad before it can be used with iTunes", but i cant enter the code on the iPad because it is saying "connect to iTunes". Can anybody help?? It is on the new iPad.

    FORCE IPAD INTO RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.

  • Where is the code for the collapse button in the default SAP iview layout?

    I need to eliminate the collapse/restore button displayed on each iView tray. I was looking at the default layout component (com.sap.portal.layouts.default) but I could not find the code for the tray.  The code for "FullWidth.jsp" (this file that implements the "FullWidth" component) is below:
    <%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibHtmlb" prefix="hbj" %>
    <%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt" %>
    <lyt:template>
        <hbj:content id="myContext" >
            <hbj:page title="Portal Page">
                <lyt:container id="column1"  />
            </hbj:page>
        </hbj:content>
    </lyt:template>
    as you can see, there is no reference to the tray tags.
    note: I am familiar with how to create a new iView tray using the new Layout Tag Library (from blog below)
    EFP: Layout Tag Library
    , but I want am not interested in this approach... All I want is to modify the EXISTING tray.

    Hi,
    may be it's helpful for you.
    http://blog.flexexamples.com/2010/05/18/changing-the-background-color-of-a-disabled-spark- textarea-control-in-flex-4/
    Regards
    -Bechar

Maybe you are looking for

  • Video plays in swfiles but not when uploaded to website

    Hi, does anyone have any idea why videos embedded in a swf file play okay in the swf file or when tested as a movie on the CS3 stage, but when uploaded to my website will not play? I am completely baffled by this. My website link is at http://www.mar

  • IBooks for Mac Doesn't Reopen Books

    iBooks isn't reopening windows after I close it. Here's what I do in sequence: 1. Open iBooks. 2. Double-click a book. 3. Click the fullscreen button in the upper-right corner. 4. Quit iBooks with CMD + Q. 5. Open iBooks. No windows pop up, not even

  • How do i get the Volume Display back on my Monitor?

    I have the Pavillion g6... When i used to press f9, f10 or f11... the volume would go down, up or mute and show it on the screen. It disappered and i think it is really nifty. How do i get this back to display the volume on the monitor

  • Later version asked but last one owned

    Hi, trying to open this document : http://www.eccnederland.nl/sites/all/themes/insiders/pdf/ecc-net-klachtenformulier.pdf, I get the error message : "To view the full contents of this document, you need a later version of the PDF viewer. You can upgr

  • Can I pass the selected member at page dimension to form business rule?

    I have a business rule which will be executed when the form get loaded, the business rule is very complex, so I want to narrow down the calculation by passing the selected member at page dimension to the business rule. For example, I have year as pag