Uploading javascript file under static files

We uploaded the javascript file under static files. By default the mime type is "application/octet-stream". We are accessing this js file in our application however this is not working.
Is this because the mime type is "application/octet-stream"?
Please let us know how to change the mime type to javascript.

Actually, we were having the same problem and determined it to be an IE bug. If we upload the .js file using Firefox, it saves as the correct mime type, x-javascript. If we use IE8, it gets uploaded as octet. Because of this, Firebug did not recognize the file, we got the following error: "the resource from this url is not text: " with the link to the uploaded file. Hence, none of the functions included in the file worked in our application.

Similar Messages

  • Error When Uploading a CSS file or  Static file

    When I am uploading a CSS or Static file , I get the following error. But I can upload images files with no issues.
    ORA-02291: integrity constraint (FLOWS_FILES.WWV_FLOW_FILE_OBJ_FK) violated - parent key not found
    Oracle XE upgraded to Apex 3.1
    Please help
    George

    Yes, if you upload an image on a normal Oracle Apex Database its stored in the DB.
    But, if you remember, when you configire apex you specify an images directory /i/.
    Under this directory you will find all the images that apex uses as well as css files, etc.
    If you place your image in this directory you can reference it my modifying the appropriate stylesheet/template.
    So, for example, you cna place your own stylesheets in the appropriate directory on the server.

  • How do I select multiple files under "Get File Info"and lock or unlock all?

    How do I select multiple files under "Get File Info"and lock or unlock them all? It seems to do it automatically when I have 10 or more selected. But how do I lock or unlock 5 or 6 files in one swoop? Thanks

    Select the desired files then press OPTION and select Show Inspector from the Finder's File menu.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Javascript function in static file not found on one theme

    Hello,
    Hava a Ajax function on a Textfield.
    Have a static Javascript file with a function named register(....)
    On my site properties in section Footer-Text I call that function.
    If I use the Theme Business - 3, my Ajax function works without problems.
    But now I have changed the Theme to Modern Blue - 20.
    Since I have changed the Theme to Modern Blue my Ajax function dont work.
    It occures an error: register is not defined
    Have anyone an idea why in theme Modern Blue it is not found my function from static file???
    greets Markus

    Hi Markus,
    The problem is that the page doesn't know where the function is yet, because it checks it at runtime, when it comes along the register call. Probably the position is different then the other theme, and you've been lucky earlier.
    My suggestion is to change the position of the call, to a position where the javascript is allready loaded. Or change the position where you load your javascript file. (For example, set it in the Page template in the HTML header!)
    I think this will solve your problem!
    Greetings,
    Rutger

  • How to set Mime Type for Static Files

    Hi All,
    I am working on Apex 3.2.1.00.10.
    When I am trying to upload (create) a ".js" file into Static Files under Shared Components of an application; it is saving as "*text/plain*" for Mime Type. But I need Mime type to be set as "*application/x-javascript*".
    Please help me to change the Mime type of .js file.
    Or is there any way to upload the file directly as "*application/x-javascript*" as its Mime Type.
    Thanks in advance.
    Umesh

    In IIS v4 which comes with the Windows NT4 option pack, you right click the web page you are working with, select properties, then go to the HTTP Headers tab. At the bottom there's a button labelled File Types in the MIME Map section.
    After you've clicked that, you can add the two mime types you need;
    Associated Extension MIME Type
    .jar application/x-java-jar-file
    .jnlp application/x-java-jnlp-file
    I'm assuming that it is the same in W2k/IIS5.

  • Static file access.

    I figured out how to upload a file I need for an app into the shared components in the shared files area.
    I've looked through the docs, the forum and help screens and I can't see how I use this now in my app. I want to create a link to get the file back when the user clicks on it. but I cannot find any info on how to display a link to that static file. how is this done? more important, where is it documented? its not under static files any where in the docs.

    You can refer to those files by using #WORKSPACE_IMAGES# substitution string for both static or image files.
    Sample if it is an image (note that no slash "/")
    <img border="0" src="#WORKSPACE_IMAGES#img.jpg" >
    If it is script file -
    <script type="text/javascript" src="#WORKSPACE_IMAGES#autofilter.js"></script>
    Ittichai
    Edited by: ittichai on Mar 10, 2009 9:01 PM

  • Not able to access files from Workspace Images and Static files

    Hi,
    We have just migrated our APEX Application from one server to another.
    All the functionality is working fine except the images or files which we are uploading
    in
    Shared Components -> Static Files
    Shared Components -> Images
    We are uloading Images in Shared Components -> Images but those are not getting displayed there.
    Similarly the files which we are uploaded in Shared Components -> Static Files are not accessible. If we
    try to download using download icon its showing blank screen.
    I am using some javascript files which i have uploaded into static files, but not able to refer them in page.
    Please someone guide us how to resolve the above problem.
    Thanks in advance.
    Thanks & Regards
    Sanjay
    Edited by: user11204334 on May 25, 2010 1:35 AM
    Edited by: user11204334 on May 25, 2010 3:45 AM

    Hello Sanjay,
    If you upload any static files such as IMAGES, FILES, or CSS you have to use the tags: #WORKSPACE_IMAGES# or #IMAGE_PREFIX# depending on your files location..
    then try something like htp.p ('<img src="#IMAGE_PREFIX#fileName.gif" />');
    And it should show the fileName.gif on your browser...
    I am not sure if i remember correctly, you can reference files to a specific application or to the whole application, if I am not mistaken..Correct me..
    Regards,
    Noel Alex Makumuli,
    Tanzania

  • Static Files download

    Hi All,
    I have uploaded Javascript/CSS files as Static files in my application. Their are few changes required in these files. But when I downloading again these files, I am getting old files from the application. How could I resolve this problem to get the latest file from the application? Waiting for the response.
    Thanks in advance.
    Regards.
    Ranjan

    Hi all,
    No response on this one since last September???
    Having the same problem in Apex 3.0.
    Had more problems in dealing with static files.
    Static files are not included in an application export.
    Separate export fails to import when exchanging them between workspaces.
    Solved this by running the script in SQL Workshop.
    We now have multiple instances of the same file for each application in the same workspace:
    damen.js     application/octet-stream     1143     300     03/05/2008 11:13:33 AM     Download
    damen.js     application/x-javascript     1143     311     03/20/2008 12:03:15 PM     Download
    damen.js     application/x-javascript     1892     312     04/23/2008 02:10:54 PM     Download
    damen.js     application/x-javascript     1143     310     03/20/2008 12:01:36 PM     DownloadJust uploaded a new version of the file, as can be seen with the time stamp.
    The application is using the newly added Javascript function.
    Though the file is less the 2k in size, it can not be opened in Apex.
    However when downloading the file for more modifications the changes are 'lost'.
    It seems that one of the other instances is returned in the download.
    When hovering over the download icons, the URL's shown in the status bar are indeed all the same.
    So, how to retrieve the last version of the file??
    Thanks for your attention.

  • Non-application specific static files not visible in shared components

    Hello,
    We recently upgraded to APEX 4.0.2.00.07. In the past we have uploaded a number of static files with no specific application linked to them.
    Now, when I search on these files using Shared Components -> Static Files, I don't find them back.
    But, if I directly query the view APEX_WORKSPACE_FILES (using the APEX schema owner), I see all the files. They have APPLICATION_ID = 0 and APPLICATION_NAME is empty.
    Is this a bug? I couldn't reproduce this with newly added static files, whether I specify an application or not.
    Matthias
    Edited by: mhoys on Mar 1, 2011 11:40 AM

    Owen:
    Excellent idea/perspective...I did not think of that.  Each of our forms/screens has a seperate class file.  Each class file has a CreateForm() routine that is called when an instance of the class is intiated behind the menu selection. 
    Here is a block of code In Main.vb I use to execute a menu selection:
    Case "MPA"
      '8/30/07 EJD - Work Order Parameters Screen
       If GetFormCount(G_MPAMaint_Form_Type).ToString = "0" Then
               Dim MPAForm As New MPA
               BubbleEvent = False
        Else
               UpdateStatus("Another MPA maintenance screen is already open", SAPbouiCOM.BoStatusBarMessageType.smt_Error)
               BubbleEvent = False
        End If
    So, I can utilize this code in the case statement where I was doing the ActivateMenu if I hear you right.  Now, can you help me with how I would pass the
    variables instead of making them Public Shared in the Main class?  Or is it ok to expose them that way?
    I Appreciate the help,
    Ed

  • Displaying Static Files

    I need some help in displaying a static file in an HTML region on a page. I have uploaded the file (a Unix script) in question (ds_broker_gim,sh) to the Static Files.
    I have a page with a report based on a Select List Item (P28_SCRIPT). This Select List has all of the unix scripts involved in an Autosys jobs. I want to drill into the script to view it.
    I've tried the following to no avail:
    <img src="#APP_IMAGES#&P28_SCRIPT.">
    <img src="&APP_IMAGES.&P28_SCRIPT.">
    <img src="#APP_IMAGES#BOA_Logo.GIF"> (this works ok but not what i want. this is a .gif file as the P@*SCRIPT is a text file. Don't know if that makes any difference? The text files are Static files wheraes the gif file is an Image. I presume that either way, they are loaded and retrieved from wwvflow_file_mgr.get_file)
    When I run the page, I get an image icon but no rendering of the text file? I look at the properties of the images and it shows: wwv_flow_file_mgr.get_file?p_security_group_id=5240132416889565092&p_flow_id=38227&p_fname=ds_ods_clients_gim.sh which should render the file?
    Obviously, I'm confused and would appreciate your assistance! Thanks

    Sorry once again - why cna't I cut n' paste here??
    Again, here's the syntax I'm using to display a static text file in a HTML region on a page: Ignore the single quotes as I think that is what is deleting the code?
    ' <img src="#APP_IMAGES#&P28_SCRIPT."> '
    ' <img src="&APP_IMAGES.&P28_SCRIPT."> '
    ' <img src="#APP_IMAGES#BOA_Logo.GIF"> '

  • Caching of static files

    Hello all,
    I was wondering if any of you has a solution to the following problem.
    If you use javascript and store these files as static files within Apex, the files will be downloaded on the client cache without an expire date.
    Now if I have an application in production, and I change the javascript source, the application will not work correct anymore, since the cached version of the javascript file is not downloaded again.
    You manually have to hit <ctrl>-F5 to force a new download.
    That's hard to explain to end users.
    Has any of you found a way to force a new download?
    The only way I can think of is rename the files and change it also in the page source. Then no cached version exists.
    And I believe if you place the files on the OS, the caching mechanism is working better, but that's not an option at the moment.
    Thanks
    Guido

    You could put the source of static files into some database procedure and run that procedure on page 0
      procedure print_js is
      begin
         htp.p{'
                   <script type="text/javascript">
                   </script>
      end;

  • Static file?

    Hi,
    I have a help.html file wihich needs to be on every page of the application. I upload it as a static file. But I don't know how to call it and from where?
    Can someone help me?
    Thanks,
    Helen

    I did like you suggest:
    help.html
    But when I click the link, error out "Page not
    found". When I point to the link, it shows:
    http://<server name:port>/pls/apex/WORKSPACE.
    Try putting # around the wokspace_image text??
    Thank you,
    Tony Miller
    UTMB/EHN

  • FTPEx: 550  : Cannot create a file when that file already exists.

    Hi experts,
    I am working on idoc to file scenario and PI 7.1. The idoc is split into 3 files.
    In sxmb_moni , the message is successful , but in rwb( Message montoring) i am geeting the fllowing  Error message.
    ' Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: An error occurred while connecting to the FTP server '172.19.125.190:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 /Storedata/Outbound/0000001802: Cannot create a file when that file already exists. '. For details, contact your FTP server vendor..'
    and this error message is not displayed for all the target files , some files are getting created succesfully.
    After some times , the file in error status , gets created automatically.
    What may be the reason.?
    Thanks in advance .
    Best Regards,
    Anil

    There seem to be already some files in your Target Directory with the same name as your new files (which the CC is trying to place) and the CC is not able to overwrite the existing files and hence the error...check this.
    Check: http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/69d7cfa4b633eae10000000a1553f6/content.htm
    14.      Select the File Construction Mode.
    u25CB       Create
    The file is created. The document received last is saved in each case.
    If you want the created file to be overwritten, select Overwrite Existing File. If you do not set the indicator, processing is stopped until the created file is processed.
    You can only set the indicator if you select Use Temporary File under Put File below.
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Jul 28, 2009 6:59 PM

  • Accessing substitution variables in static uploaded javascript file

    Hi there,
    I just created variables and a pageinit function in my page header and try to access these variables (Flow_Id, Page_Id etc) within a js-file I uploaded into workspace static files.
    I try to use them within an URL ( e.g. "f?p="+ Flow_Id + ":100:" + Session_Id ), but they are -undefined- and thus lead to a 404-Page!
    Here is the code:
    onload="pageinit()"             //in page html body attribute
    //and the following code in the html header
    <script type="text/javascript">
    <!--
    var Flow_Id; // application id
    var Page_Id; // page id
    var Session_Id; // session id
    var Request; // request value
    function pageinit(){
    Flow_Id = html_GetElement('pFlowId').value; // application id
    Page_Id = html_GetElement('pFlowStepId').value; // page id
    Session_Id = html_GetElement('pInstance').value; // session id
    Request = html_GetElement('pRequest').value; // request value
    //-->
    </script>Can someone please point me to the right direction!?
    Thank you very much.
    Regards
    Johnny

    Hi Paul,
    I tried with IE 8 now and could at least find out now, which lines of code are responsible for the error:
    addmenu(menu=[                    
    "mainmenu",                    
    69,                         
    153,                         
    1,                         
    style1,                         
    1,                         
    "left",                         
    1,                          
    0,                         
    ,"Home","f?p=" + $v('pFlowId') + ":100:" + $v('pInstance'),,"",1 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
    ,"Tab2","show-menu=list01","tab2.html","",1
    ,"Tab3","f?p=300:1:","tab3.html","",1
    ,"Tab4","show-menu=list04","tab4.html","",1
    ])It must be the way I try to create the first URL (for Home) I already mentioned, because if I hard-code the URL, it works without errors.
    I could hard-code the URL, but then I always get a new session-id. So, at least I need to find a way of accessing the current session-id here.
    As mentioned before, I also tried to set global variables within a javacript function in the page header and assigning the current values for the session and app-id and reference these variables within the js-file I uploaded to the static files. But that did not work either. These variables were undefined.
    I guess they were undefined because at the time when the function was processed the variable might not have been set yet.
    But I followed exactly the solution Carl Backstrom mentioned in some of his posts some years ago. God bless him.
    I am not a javascript expert, so maybe you got a hint for me!?
    Thanks again for your support.
    Johnny

  • APEX 3.1.2 Static File Upload Issues

    We are still running on APEX 3.1.2 though we hope to go to 4 very soon.
    We had a production problem this past week that is perplexing. I have seen other posts referencing similar issues but no solutions.
    We have an application that has several Static File Javascripts (.js). We already ran into the IE Upload bug so we only upload in Mozilla now.
    We had changes to one of the .js files (identity.js). I deleted the old file using the Shared Components screen and uploaded the new one. The action was "Successful" but the file was still the old version. We deleted a file of 73 lines of code and uploaded a new version of 28 lines. After successful upload, we still would get the 73 line version . The app was still getting that version too.
    I deleted it many times and tried again. I ran scripts to do both the delete and upload. I even deleted the file manually from the FLOWS_FILES table that held it. Still got the old version.
    We bounced the server (thinking it was cached somewhere) - still got the old version. Finally, in desperation, I started cloning the app to another app number in another Workspace. Since we use aliases, I thought I could use a clean Workspace and uplad the new file there. This worked but - suddenly the old Workspace started using the correct file.
    Is ther some secret cache somewhere that needs to be cleared out? I did not want to start randomly clearing out caches and there is no documentation on this issue.
    Is it something about our config - we have Oracle HTTP Server, OC4J, and modplsql for this environment with a 10g database.
    Any insight would be appreciated - my manager does not like "it fixed itself magically".

    We ruled out the browser caching by trying the app on several other people's PCs.
    I am thinking it is being cached somewhere in the APEX server environment but cannot find any documentation on where or what that might be.
    I think I might have triggered a refresh when I was trying to implement a cloned version (in a different Workspace). It seems that the scope of a JS file is within its Workspace so we figured that a new Workspace would treat the changed file as a new file - and it did. During this process, we had duplicate ALIAS for a minute and I think that confused the APEX App Engine and triggered the refresh.
    But that is a SWAG opinion.
    I also thought of "versioning" the JS files but our developers are not too keen. If we don't find another solution, that may be what we have to do.

Maybe you are looking for

  • How do i clear the space used by MAIL on my iPhone5 ?

    I am using the iPhone5 16GB and lately am facing free memory space available issues. I checked on the memory used by various apps and found that MAIL is using 5GB alone. Kindly help me in reducing this... Earlier iOS version, I recollect we had an op

  • Chooser problem with HP PSC 1410 and HP Deskjet 5940 on Classic

    Excuse me for my bad english, I am french... !!! I have just bought macmini with HP DeskJet 5940 promotion. I installed internet last driver for it. Printing is OK with Mac OS 10.4.4 but doesn't work with Classic. Printer is connected by USB port. I

  • Connecting Airport Express to Airport Extreme

    I had a linksys router with a remote wireless Airport Express and it connected and worked wonderfully. The Linsys router died so I replaced it with an Airport Extreme. Now I can't connect to the Airport Express. It does not show up in the Airport Uti

  • Calendar does not allow 2nd alert option

    I'm using an iphone5 with the latest update (6.1.4) on AT&T network, as does my coworker. She can set an alert then a 2nd alert for a calendar event (ie: 1hr before and 1 day before).  I can only set one.  I see the Default event alert option in Sett

  • How do you uninstall mac os x lion?

    Hello, I installed os x lion on my macbook air (2-mos. old) & realized after this that I cannot run my microsoft office.  I need to uninstall this lion and go back to snow leopard.  Does anyone know how to do this?  Reinstall drive does not work for