Mime-type and/or extension of script file

I would like to generate a script file dynamically on my web server and then have it downloaded to my users such that they can simply double-click the file and have it execute. I've gotten pretty close by using the ".command" extension, but it still requires a "chmod +x filename" after download in order to work properly. Is there another extension or a mime-type that I could use that would cause Mac OS X 10.4 and/or 10.5 to grant execute rights to the user that downloaded it? I'm not married to it being shell script if it can be done with AppleScript, Ruby, etc that would be great. It basically just has to be text file (non-binary format) so I can dynamically generate it on the server side.

Hi Daniel,
do you use EPG, mod_plsql or APEX Listener? Have you changed the connection mechanism after upgrading to 4.2.1?
If you use the APEX Listener, which version do you use? Which browser and version do you use to upload the file? Does it reproduce with other browsers as well?
Regards
Patrick
Member of the APEX development team
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf

Similar Messages

  • When I try to click on a download link for a .pdf file Firefox does not recognize the MIME type and tries to download the file as "index.php"

    When visiting a site I frequent I tried to download a linked .pdf file. Previously I've used Firefox 7.0.1 to download the link with no problem. Using Firefox 8 however I the browser does not recognize the .pdf link's mime type. Instead of recognizing the download link as a .pdf file Firefox 8 tries to download it as "index.php". Firefox 8 does this with .doc files and .txt files as well. When I downgrade to 7.0.1 again the problem disappears.

    Hi hakmacpace,
    I'd try starting Firefox in [[Safe Mode]]. If you don't have the issue while all of your add-ons, extensions, and themes are disabled, you can try adding them back in one by one until you find the culprit. You should look at the [https://support.mozilla.org/en-US/kb/Troubleshooting-extensions-themes Extensions and Themes troubleshooting guide ] and the [[Troubleshooting plugins]] article as well.
    You could also try [https://support.mozilla.org/en-US/kb/Managing-profiles?s=create+a+new+profile&r=2&e=es&as=s#w_creating-a-profile Creating a new profile].
    Hopefully this helps!

  • Automatically open file based on MIME type and file extension

    We have an app that is registered to handle custom MIME type and file extension. This works perfectly on IE and FireFox causing them to download the file to a temp folder and then launch our app associated with MIME type and file extension with command line to the downloaded file. On Safari however this does not work. It opens up a download window and shows that it has downloaded the file with no option to open it.

    hello, you can file a bug on bugzilla.mozilla.org if you want to include your plugin in the plugin finder service...
    [https://wiki.mozilla.org/PFS]

  • Get Uploaded File Mime Type and Client Filename

    Anyone know how to recover an uploaded file MIME type and
    client file name?
    I'm writing my own cfx tag to process file uploads and pretty
    much have it figured out except to determine the name of the client
    file and mime type. The formfield file variable value contains the
    path/filename to the CF temp directory, but I need the MIME type,
    filename, etc. that is contained int he HTTP Header
    (e.g. Content-Disposition: form-data; name="Image";
    filename="C:\test.JPG"
    Content-Type: image/pjpeg
    [empty line])
    I'm using the getHttpRequestData() functiont, but it only
    gives me the content-type multipart/form-data, leaving out the Mime
    type and Content-Disposition (which contains the client file name).

    Hi Daniel,
    do you use EPG, mod_plsql or APEX Listener? Have you changed the connection mechanism after upgrading to 4.2.1?
    If you use the APEX Listener, which version do you use? Which browser and version do you use to upload the file? Does it reproduce with other browsers as well?
    Regards
    Patrick
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • [svn] 1607: Set svn:mime-type and svn: eol-style on LICENSE and NOTICE files in the lib directory.

    Revision: 1607
    Author: [email protected]
    Date: 2008-05-07 17:02:39 -0700 (Wed, 07 May 2008)
    Log Message:
    Set svn:mime-type and svn:eol-style on LICENSE and NOTICE files in the lib directory.
    Modified Paths:
    flex/sdk/branches/3.0.x/lib/batik-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/commons-discovery-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/xalan-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/xerces-LICENSE.txt
    Property Changed:
    flex/sdk/branches/3.0.x/lib/batik-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/batik-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/commons-collections-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/commons-discovery-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/commons-logging-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/commons-logging-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/mm-velocity-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/mm-velocity-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/xalan-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/xalan-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/xerces-LICENSE.txt

    Thanks for your attention.
    In the above logs, higher resolutions seems to be detected on both screens, hence my surprise :
    [ 391.631] (II) intel(0): Printing probed modes for output LVDS1
    [ 391.631] (II) intel(0): Modeline "1600x900"x60.0 110.00 1600 1664 1706 2010 900 903 906 912 -hsync -vsync (54.7 kHz eP)
    [ 391.897] (II) intel(0): Printing probed modes for output HDMI1
    [ 391.897] (II) intel(0): Modeline "1680x1050"x59.9 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz eP)
    If it can help here is also my current xrandr output (after having called it manually to use the preferred resolution of each screen)
    itanguy ~ $ xrandr
    Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
    LVDS1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
    1600x900 60.0*+ 40.0
    1024x768 60.0
    800x600 60.3 56.2
    640x480 59.9
    VGA1 disconnected (normal left inverted right x axis y axis)
    HDMI1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 434mm x 270mm
    1680x1050 59.9*+
    1280x1024 75.0 60.0
    1152x864 75.0
    1024x768 75.1 60.0
    800x600 75.0 60.3
    640x480 75.0 60.0
    720x400 70.1
    DP1 disconnected (normal left inverted right x axis y axis)
    HDMI2 disconnected (normal left inverted right x axis y axis)
    HDMI3 disconnected (normal left inverted right x axis y axis)
    DP2 disconnected (normal left inverted right x axis y axis)
    DP3 disconnected (normal left inverted right x axis y axis)
    If needed, I may reboot and provide xrandr output after boot (it will be 1024x768), or could other logs help you ? Please ask...

  • Mime-types and schemas

    Hi
    after my last update yesterday I have got some problems with some mime-types. Directly after the update pacman said the following:
    Warning in file "/usr/share/applications/nautilus-folder-handler.desktop": usage of MIME type "x-directory/gnome-default-handler" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
    Warning in file "/usr/share/applications/nautilus-folder-handler.desktop": usage of MIME type "x-directory/normal" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
    Error in file "/usr/share/applications/oraclexe-readonlinehelp.desktop": "Application/database" is an invalid MIME type ("Application" is an unregistered media type)
    Error in file "/usr/share/applications/oraclexe-startdb.desktop": "Application/database" is an invalid MIME type ("Application" is an unregistered media type)
    Warning in file "/usr/share/applications/chromium-browser.desktop": usage of MIME type "x-directory/webdav" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
    Warning in file "/usr/share/applications/chromium-browser.desktop": usage of MIME type "x-directory/webdav-prefer-directory" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
    I also get a similar message when I try to install awn-extras from AUR altough it is installable (but not fully functional).
    (1/1) Installiere awn-extras-bzr [#####################] 100%
    I/O warning : failed to load external entity "/usr/share/gconf/schemas/awn-extras.schemas"
    »/usr/share/gconf/schemas/awn-extras.schemas« konnte nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden
    It says, that the schema isnt found. Do you have any solutions?
    ~kiro

    .oO(Art)
    >When validating site, I'm getting the the following
    warning
    >-------------------------
    >Conflict between Mime Type and Document Type
    >
    >The document is being served with the text/html Mime Type
    which is not a
    >registered media type for the XHTML 1.1 Document Type.
    The recommended
    >media type for this document is: application/xhtml+xml
    >-------------------------
    >I work with ASP and I can't figure out why, really, it's
    doing this nor
    >can I figure out how to solve it.
    XHTML 1.1 documents should be delivered as
    application/xhtml+xml. This
    is not recommended, since IE doesn't support this MIME type.
    So switch
    back to XHTML 1.0 Strict, which can also be delivered as
    text/html.
    Micha

  • Mime Types and site validation?

    When validating site, I'm getting the the following warning
    Conflict between Mime Type and Document Type
    The document is being served with the text/html Mime Type
    which is not a
    registered media type for the XHTML 1.1 Document Type. The
    recommended
    media type for this document is: application/xhtml+xml
    I work with ASP and I can't figure out why, really, it's
    doing this nor
    can I figure out how to solve it.
    I use: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    and everything validates fine except for this last thing.

    .oO(Art)
    >When validating site, I'm getting the the following
    warning
    >-------------------------
    >Conflict between Mime Type and Document Type
    >
    >The document is being served with the text/html Mime Type
    which is not a
    >registered media type for the XHTML 1.1 Document Type.
    The recommended
    >media type for this document is: application/xhtml+xml
    >-------------------------
    >I work with ASP and I can't figure out why, really, it's
    doing this nor
    >can I figure out how to solve it.
    XHTML 1.1 documents should be delivered as
    application/xhtml+xml. This
    is not recommended, since IE doesn't support this MIME type.
    So switch
    back to XHTML 1.0 Strict, which can also be delivered as
    text/html.
    Micha

  • Webdynpro to limit MIME types and size

    Hi,
    I need to write an web dynpro application to limite the file type and size using IWDFileUpload API, does anyone has some suggestion ?
    Thanks a lot.
    Kind regards
    Ben.J.

    Hi Ben,
    I think you can restrict the file type and and also check the file size before uploading the file. You need to write the logic to check out the file type.
    Use the following code to check restrict the file upload of only txt file...
              IPrivateTestView.ITestElement pf =
                   wdContext.nodeTest().currentTestElement();
              IWDMessageManager mgr = wdComponentAPI.getMessageManager();
              if (pf.getFileResource().getResourceType().getFileExtension() != null
                   && pf
                        .getPatchResource()
                        .getResourceType()
                        .getFileExtension()
                        .equalsIgnoreCase(
                        "txt")) {
    // Check if file size is in valid range.. call getFileSize()
    mgr.reportSuccess("File can be uploaded");
              } else {
                   mgr.reportException("Kindly upload ont TXT files", false);
    And use following code for calculating File Size:
         private String getFileSize(IWDResource resource) {
              InputStream stream = null;
              DecimalFormat myFormatter = new DecimalFormat("###.##");
              double size = 0;
              String unit = "";
              try {
                   stream = resource.read(false);
                   size = stream.available();
                   if (size < 1024) {
                        unit = " Bytes";
                   } else if (size < 1048576) {
                        size = size / 1024;
                        unit = " KB";
                   } else if (size < 1073741824) {
                        size = size / 1024 / 1024;
                        unit = " MB";
              } catch (IOException e) {
                   wdComponentAPI.getMessageManager().reportException(
                        e.getLocalizedMessage(),
                        true);
              } finally {
                   if (stream != null) {
                        try {
                             stream.close();
                        } catch (IOException e) {
                             wdComponentAPI.getMessageManager().reportException(
                                  e.getLocalizedMessage(),
                                  true);
              return myFormatter.format(size) + unit;
              //@@end
    This way you can restrict the users. As far as I know there is no standard way of restricting the same
    Hope it helps
    Regards
    Abhinav

  • I keep getting script errors regardless of the FF version I'm running. This time it's on 3.6 and the error is Script: file:///C:/Program%20Files/Mozilla%20Firefox/modules/utils.js:1027

    I had to downgrade from ver. 4.0 back to 3.6 for my job. This version is the only on compatible with their add-ons and it gives me script errors at least twice a day. The only add-ons I'm running are for work and others who do this job don't have this problem. Using 4.0 I did experience it less often but it wasn't completely cured.

    This is typically caused by a problem with the Personas Plus 1.6 add-on and it conflicting with the Google toolbar.
    Try disabling the Personas Plus add-on. To do this open the add-ons manager by selecting the Tools menu, then Add-ons. In the list of installed extensions click on Personas Plus, then click on either disable or uninstall.
    If you can not access the add-ons manager, follow the instructions in the [[safe mode]] article to start Firefox in safe mode. You should then be able to disable or uninstall Personas Plus. You can find more information on this procedure in the [[Troubleshooting extensions and themes]] article.

  • How to keep the page-setting and the extension of a file uploaded to a form

    Hi,
    I created a form based on table witch contain a blob.
    If i upload into it an HTML file, when i load it in a report it look fine. But, if i upload a MSword or PDF file
    it display binary characters.
    Please help.
    Thanks.

    Hi Scafandri ,
      LEAD SELECTION IS A PROPERTY OF A NODE.  YOU CAN CHECK AND UNCHECK THAT PROPERTY UNDER NODE PROPERTIES.
    OR IF YOU WANT TO SET SELECTED ROW AS LEAD SELECTION THEN USE THE BELOW LINK IT WOULD BE HELPFUL
    retreiving the selected row index value
    In onclick  event of alv table,
    first get the index value of selected row  using r_param->get_index( ).
    Then using this value  set lead selection  like below
    lo_nd_itab->set_lead_selection_by_index ( above index value ).
    Then selected row will become the leadselection.
    Regards
    Srinivas

  • Uploading files Mime Type not correct for Office 2007 default extensions.

    hi all,
    My company has recently moved over to MS Office 2007 and the default extensions for word, excel etc are now .docx, xlsx etc (ie xml based).
    Unfortunately now when we upload files through APEX to the database the MIME TYPE value for these files isn't being recognised and not loadeding correctly into the APEX_APPLICATION_FILES table and subsequently any future retrieval of these files fails.
    I could put some logic inthe up load procedure to look at the filename in APEX_APPLICATION_FILES and hard code in the releavnt mime types but this still causes problems when retrieving the content.
    Has anyone come across this and got a workround? Is it a bug in AE?
    regards
    James
    FYI - using APEX 3.0.2 over 11G.

    I have not any response to my question and not sure if it is in Apex I need to look or the tomcat server that I need to look. I have a useful application to try to show others what Apex can do for our customers to collaborate. However, most of our customers are using office 2007 so, hoping this is possible.
    I am using apex 3.2.0.00.27 if that helps someone to point me where to find more info on being able to have Word 2007 or excel 2007 fire up to open a .docx or .xlss file stored in a table blob column. Word or Excel does fire up to open .doc and .xls files.
    The following is the query for a report selecting the filenames uploaded into a blob column in my table:
    { SELECT s.ID, SUBSTR(s.NAME,INSTR(s.NAME, '/',1,1)+1,length(s.NAME)) SHORT_FNAME, s.SUBJECT
    FROM spp_attachments s
    WHERE s.PROGRAM_ID = :P2_PROGRAMID }
    Below is the stored procedure called from the link on the short_fname column in report query above.
    { create or replace PROCEDURE  download_file(p_file IN number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    APEX_APPLICATION.G_FLOW_ID :=245;
    IF NOT (wwv_flow_custom_auth_std.is_session_valid) then
    owa_util.status_line(404, 'Page Not Found',true);
    return;
    else
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM spp_attachments
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(v_mime,'application/octet'),
    FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment;
    filename="'||replace(REPLACE(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),NULL),chr(13),NULL)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    end if;
    end download_file; }
    Thank you,
    Mark

  • Identifying the correct MIME type for file uploads

    How does Apex identify the MIME type of an uploaded file? I have a page that uploads a file and accesses it via APEX_APPLICATION_FILES. That works fine. The problem is that, for certain file types, the mime_types column is "application/octet-stream" instead of the correct file type. I think it's using the Content-Type from the client browser, though I'm not quite sure. Is there any way to override this server-side in Apex?
    I'm running Apex with mod_plsql. Adding an AddType directive to Apache and adding the correct association to the mime.types file did not work.

    Hi,
    I also noticed this - it seems that Microsoft's 4 char extensions like .docx are not being recognized by application type so that either the web server or mod-plsql is defaulting to the "application/octet-stream" mime type which refers to a file with binary content - instead of the traditional "application/msword" mime type you would expect.
    If you know, at the point of insert into your database table, both the mime type and file name, one workaround would be to check if the mime type is 'application/octet-stream' and the file's extension is ".docx" or other likely extensions and then treat it as mime type 'application/msword", etc.
    Not really a solution but might be sufficient workaround depending on your situation.
    Ted
    Edited by: Ted Martin on Oct 25, 2012 7:27 PM

  • 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.

  • Image size and mime type.. non-java guy needs help

    Image size, mime type.. non-java guy needs help
    Im not at all familiar with java so this is really weird for me to work out. I?ve been doing it all day (and half of yesterday).
    Im trying to write a custom clodFusion tag in java that gets the width, height, size and MIME types of a given file. I?ve been trying to get it to work on the command line first. I can get the width and height but cant get the size and the MIME type.
    Here is what I got
    /*import com.allaire.cfx.*;*/
    import java.awt.image.renderable.*;
    import javax.media.jai.*;
    import com.sun.media.jai.codec.*;
    import java.io.*;
    import java.util.*;
    public class ImageInfo {
    private RenderedOp image = null;
    private RenderedOp result = null;
    private int height = 0;
    private int width = 0;
    private String type = "";
    private String size = "";
    public void loadf(String file) throws IOException
    file = "80by80.jpg";
    FileSeekableStream fss = new FileSeekableStream(file);
    image = JAI.create("stream", fss);
    height = image.getHeight();
    width = image.getWidth();
    System.out.println(height + "\n");
    System.out.println(width);
    System.out.println(type);
    public static void main(String[] args) throws IOException {
    ImageInfo test = new ImageInfo();
    test.loadf(args[0]);
    can anyone please help me out to modify the above so I can also print the mime type and the file size to screen.
    thanks for any help

    any suggestions?

  • .htaccess and MIME types not working in 3.1

    anyone else noticed that when using a .htaccess file to determine certain mime types safari 3 ignores the .htaccess file and handles the file the way the OS would normally?
    i'm hosting a bunch of 1080p .mov's and I'd prefer if they would just download when clicked on instead of trying to open in a window where they go out of frame.
    i've currently got the addtype set to octetstream, and on safari 2 and firefox they both automatically start to download, but safari 3 tries to open the movie in the browser window.

    I think that it is interesting to note that as I peruse the various threads dealing with 3.1 update problems the majority of complaints seem to be coming from iPhone/Mac combos; based, at least, on the posters signiture.
    For my part, 64bit vista win machine and 3Gs, the update could not have been soother and the phone works better then it did; no app problems, better wi-fi conectivity, faster loading of apps and files.
    I have had, though, considerable problems with Outlook sync, contacts sync and MM sync (enough so that I turned off MM except for iDisk); but most of these are known issues so just need to with it out.
    Seems like Apple could have workedd this stuff out before hand, though.

Maybe you are looking for

  • Hyperlink in adobeform(printform)

    Hi can anyone tell how to add Hyperlink to adobeforms(Non-interactive) for preview purpose, i tried with gotoURL syntax but since its a non interactive events are not enabled.So kindly help on how to give hyperlinks. Thanks

  • Updating from os x 10.5.8 to 10.6.5.

    I have a IMAC 2.4 Ghz Intel Core 2 Dou machine which is operating with the Mac OS X version 10.5.8.  I know there have been a number of software updates leading to teh last version of OS X 10.6.5.  I was wondering if I need to install all the previou

  • Audio Skimming is not working ?

    Can someone please help me ?!   I started using IMovie on my new MacBook Pro about 3 weeks ago at the time I could use the audio skimming feature with no issues.  I just went to play around with the program today and noticed that there is no Audio wh

  • Use Authentication on XI using Java code

    I work with one project on web service implementation with SAP XI I want to use XI authentication for my web application. which style should I use for XI authentication Do you have any readymade java sample code availabe for user authentication? Can

  • Starrt career in SAP

    Hi, I am having IT experince of 2 years. I have been working in java since 2 years . I want to switch my career to SAP . I have no idea about SAP . Can anyone please suggest me what could be best option for me.