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

Similar Messages

  • 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

  • Mime type note set for css with wwv_flow_file_mgr.get_file

    Hello,
    We have an apex application over here that has problems with the mime type of a theme (css) file. The css file works correctly in IE but not in FF or Chrome (because IE check the file extension, but FF seems not do not ..).
    This is the call that is failing
    <link type="text/css" rel="stylesheet" href="wwv_flow_file_mgr.get_file?p_security_group_id=33490830277084435&p_fname=theme_3_1.css" />
    in the FF error console it complains about the file being of application/octet-stream instead of text/css and therefore it will not load it.
    I have created a simple local .htm file with
    <html>
    <link type="text/css" rel="stylesheet" href="http://xxx.xxx.xx/pls/htmldb/wwv_flow_file_mgr.get_file?p_security_group_id=33490830277084435&p_fname=theme_3_1.css" />
    </html>
    And it loads the file (even though it says it is still application/octet-stream) in FF, but it will not do the same if called from Apex.
    I'm kind of lost here, so any ideas where to look for an explanation/fix ? (Yes, we have the AddType text/css .css in the httpd.conf)
    regards.

    Hi UserXY,
    what connectivity module do you use (Oracle HTTP Server, Embedded PL/SQL Gateway, APEX Listener)?
    Which Browser did you use to upload the css-File?
    I don't know why this happend in your case, but you could try a different browser to upload the file again.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    Work: http://www.click-click.at

  • Powerpoint uploads and MIME types

    I am building an application to upload PPT files. I want to
    test the
    incoming filenames to see if it *is* a PPT file, but cannot
    find a MIME type
    for it. How should I do this so that I only allow such files
    to be
    uploaded?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================

    OK - here's the skinny:
    PPT extension files have a MIME type (PC or Mac) as stated.
    PPTX extension
    files (PC or Mac) have a MIME type as shown in the line in my
    code below -
    if (($_FILES['uploadfile']['type'] ==
    'application/vnd.ms-powerpoint') ||
    ($_FILES['uploadfile']['type'] ==
    'application/vnd.openxmlformats-officedocument.presentationml.presentation'))
    This test appears to work as desired. Why would I not want to
    use it to
    filter all but Powerpoint files?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > Thanks, Joe! See my reply to Gary's post....
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > ==================
    >
    >
    > "Joe Makowiec" <[email protected]> wrote in
    message
    >
    news:[email protected]...
    >> On 03 May 2008 in macromedia.dreamweaver.appdev,
    Murray *ACE* wrote:
    >>
    >>> I am building an application to upload PPT
    files. I want to test
    >>> the incoming filenames to see if it *is* a PPT
    file, but cannot find
    >>> a MIME type for it. How should I do this so that
    I only allow such
    >>> files to be uploaded?
    >>
    >> application/vnd.ms-powerpoint ppt
    >>
    >>
    http://www.w3schools.com/media/media_mimeref.asp
    >>
    >> I just checked several Powerpoint files - the first
    8 bytes are (hex)
    >> d0 cf 11 e0 a1 b1 1a e1
    >> in all the files I checked. So you can:
    >> - upload the file
    >> - open the file up and examine the first 8 bytes:
    >> $handle = fopen($filename, "rb");
    >> $contents = fread($handle, 8);
    >> if ($contents != $testvalue) { ...
    >> - for dealing with the binary string, see bin2hex
    and pack
    >>
    >>
    http://www.php.net/manual/fopen
    >>
    http://www.php.net/manual/fread
    >>
    http://www.php.net/bin2hex
    >>
    http://www.php.net/pack
    >>
    >> (This is PHP, right?)
    >>
    >> I'd also examine a few more powerpoint files - I
    think that there are a
    >> few different types? - to be sure that the signature
    I list is
    >> characteristic. And remember that Microsoft
    completely changed file
    >> structures for Office 2007, and that .pptx is
    probably completely
    >> different to all other previous formats...
    >>
    >>
    http://en.wikipedia.org/wiki/Microsoft_PowerPoint#File_formats
    >>
    >> --
    >> Joe Makowiec
    >>
    http://makowiec.net/
    >> Email:
    http://makowiec.net/contact.php
    >

  • [Photoshop CS5] Optimize to File Size working not correctly.

    ******BUG******
    Concise problem statement: Optimize to File Size working not correctly.
    Steps to reproduce bug:
    1. Open any photo.
    2. Draw a slice
    3. Save For Web, choose Optimize to File Size, type 10KB (Current Slice).
    4. Save "selected slices" only
    Results: File result larger than expect (over 10KB)
    Expected results: <=10KB filesize.
    I uninstalled whole Adobe CS5 Master Collection (Trial) & tried to reproduce the bug in Photoshop CS4, but it was not happened, it's ok on CS4.
    Finally, Windows 7 is not reason, it's a bug of Photoshop CS5. Please fix, I don't want to buy a bugged software.
    I really need the feature "Optimize to File Size" in my works.
    P.S: I tested on 4 PCs, and the results is the same.

    In the SFW dialog change the Metadata dropdown to None

  • Weblogic +  jnlp MIME Type not recognised

    Can anyone help, I'm trying to get JWS to run on a machine that is running a Weblogic & Apache server for a large enterprise app. I've added the jnlp mime type to both the httpd.conf & weblogic.properties file. Depending upon where the jnlp file is situated, it either is returned as xml in the case of the Weblogic dir,hte mime type not being recognised or JWS starts and then throws a text.html error, if the the jnlp file is in the Apache htdocs dir. I've read that Weblogic introduced support for jnlp but my version doesn't include it in the config file. Is there a work around or won't JWS work with early versions of Weblogic?

    same problem for me also
    i have the lines in web.xml what you said
    but the mime type is not recognized
    help me
    --parthi                                                                                                                                                                                                                                                   

  • What MIME type to use for DNG?

    Is there an 'official' MIME type to use for DNG? I've seen image/x-adobe-dng used, also image/tiff, and sometimes image/x-dcraw. I'd like to know so that I can characterize DNGs correctly for format identification software we are writing. I don't believe the MIME type is specified in the DNG spec. Thanks.

    I think this is clear
    image/x-adobe-dng = DNG
    image/tiff = for tiff images. I know that Phase One gives there RAW images .tif at the end but tiff sould be a real image.
    image/x-dcraw = for other camera raw files like CRW/CR2 of Canon, NEF of Nikon....
    I would suggest to use the "image/x-adobe-dng" for DNG files.

  • Upload file of type Spreadsheet.ods  to internal table

    Hi Experts,
    can any body give me function module to upload file of type Spreadsheet.ods  into internal table
    Thanks in Advance
    Narendra

    Hi Renu,
    it is not supporting this function modules.
    we r using open office and its just like excel sheet.
    even function module ALSM_EXCEL_TO_INTERNAL_TABLE
    not supporting.
    Narendra

  • [CLOSED] Graphical file/mime type association editor?

    Is anyone aware of a general-purpose (i.e. not belonging necessarily to one of the major DEs) file/mime type association editor? I'd like to be able to change the default applications of a given file-type independently of the DE. In particular, I'd like to know how to set a default file manager.
    Last edited by nbtrap (2011-10-31 19:39:10)

    It doesn't look like there is a desktop-independent GUI for editing filetype associations. As far as I now understand, the concept itself it practically meaningless since DEs that conform to xdg standards have their own sets of associations. At any rate, the xdg-* tools are actually quite easy to work with. And I don't see any difference between mimeo and xdg-open. Thank you both for your help.

  • IFilter 9 not searching OCR .PDFs post SP2 for Office 2007 Servers

    Prior to the installation of Service Pack 2 for Office 2007 Servers, .PDF files that were scanned in and then ran against Optical Character Recognition software could be searched with the iFliter 9 for Windows MOSS, x64.  Now, those specific files no longer are searchable however; files that were converted directly from another application, such as MS Word or Excel, that were converted directly into .PDF files work fine.  Has anyone ever seen anything like this or can give me a direction to go to get this resolved?  Adobe's support for this product is non-existant and I am sure Microsoft will not be a help since it is not their product.

    See if this discussion helps:
    http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sha repoint.general&tid=d11d3de7-8344-4dad-9f09-bd84c39e9817&mid=d11d3de7-8344-4dad-9f09-bd84c 39e9817&cat=en_US_2BE0F7C1-F80B-C480-EA27-790E679D7E1B&lang=en&cr=US&sloc=&p=1
    or
    http://www.adobe.com/special/acrobat/configuring_pdf_ifilter_for_ms_sharepoint_2007.pdf

  • DRM-79819: Encryption error: Config file encryption is not valid for this m

    Hi ALL,
    Suddenly we got this error while running an export via batch utility. any ideas?
    Error: DRM-79819: Encryption error: Config file encryption is not valid for this machine.

    This could be an issue with your drm-config.xml file, the file that stores the DRM configuration information defined in the DRM Console. If a drm-config.xml was restored from an old backup or copied from another machine, this could well be the issue.
    In this case, you can run the DRM Console to update the file and correct it. You may see a one-time error reported when the DRM Console starts up, but the Console app should correct the file automatically after reporting the error to the user.
    If this does not resolve your issue, review the Windows App Event Log, to determine which DRM Server process(es) are also reporting this error (to narrow down any other potential issues with a config file for one of the DRM Server executables). I am guessing this error was observed in just the DRM Batch client, but related Event Log should also be present in the App Event Log.
    HTH.
    *** An additional note, if your issue proves to be the one above, you may need re-enter passwords on your defined Database Connections for defined DRM Apps. Try just re-running the DRM Console and re-saving the config initially, but be aware this may be a required additional step, re-entering the DB passwords after the updated encryption has been applied to the stored drm-config.xml file.
    Edited by: 680314 on Jan 19, 2013 11:52 AM

  • 50L4300 TV MIME Type Not Supported

    My Toshiba 50L4300 TV web browser is having problems with some web pages and shows such error MIME Type Not Supported. Can not open MIME type resource. It has Software 7.2.67.32.01.1 Jul 02 2014. MBOOT Version: 00467596.
    Any idea why do I have this error? please find enclosed pictures.
    Attachments:
    1.JPG ‏22 KB
    2.JPG ‏29 KB

    The TV doesn't have support for Flash content. Flash is a third-party plugin available for many web browsers. I'm sorry.
    - Peter

  • ERROR OGG-01148 programming error, data type not supported for column

    I am getting following error when I put null in insert statement
    2011-03-31 18:30:45 ERROR OGG-01148 programming error, data type not supported for column TXID in table advoss.tblaudittrail.
    I am replicating MySQL 5.5.9 to Oracle 11g rel2 via goldengate 11

    I am able to diagnose what is cuasing the problem
    unsigned flag was the culprit of this error
    I am able to insert null after removing unsigned flag.
    thank you very much for your kind support

  • U2018Transaction type not relevant for asset postingu2019

    while using tcdoe f-58 down payment to vendor giving error message  u2018Transaction type not relevant for asset postingu2019

    Hi ,
    could you please go to transaction code OAYB and select the TTY grp 15 + choose specification of asset classes.
    Please confirm if the asset class (for the affected asset) is assigned to the TTY group 15 and also please verify the chart of depreciation.
    Incase if the asset classes is not assigned to the TTy grp 15, then we need to maintain it.
    Regards
    Govindarajan

  • ESS Business Package Error: Period type not allowed for profile ESS

    Hi,
    We are trying to configure the business package for Employee Self Service on Enterprise Portal 6.0. We followed this SDN contribution <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eb036a-0a01-0010-25a3-b2224432640a">ESS doc guide</a>
    So far we have successfully deployed the business packages and followed all the configurations that were pointed out in the doc guide. Unfortunately when we try to access the Employee Self-Service portal pages (Overview, Employee Search, etc), we encounter this error:
    Critical Error:
    Period type not allowed for profile ESS, error key: RFC_ERROR_SYSTEM_FAILURE
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException:      Period type not allowed for profile ESS, error key: RFC_ERROR_SYSTEM_FAILURE
    Any ideas on how to fix this issue?
    Regards,
    Jojo

    Hi Jojo,
    Have you solved the problem? If yes can you please help me even I am facing the same error.
    this is very help full to me .
    Thanks and Regards,
    Shilpi.

Maybe you are looking for

  • Creating a new class

    Hi all, I am new to Java programming and trying to figure out some issues with a class This is the problem I am trying to solve 1. I am trying to parse a xml and represent it in a JTable 2. I have parsed the xml and stored it in vector of vector form

  • Removing binary characters/ special chrs from string entered by user

    Dear gurus, I have a string entered by users in database from where i am pulling data into SAP BW. Th problem is that the string contains binary characters. It is showing error and cant be upoaded Is there any function module/ code that removes binar

  • Auto more not working

    Hello all, From the ECB IT dept, having an issue with a users 8800. When the user views emails, it only displays the the first part, to view the rest user must click on more all. Did some research and found out about more all, set the user blackberry

  • Table Names for "Payroll Interface Tables"

    How can I find out the exact table used in "Payroll Interface Tables" section? Some of them are Configuration, Field Definition,Definition, Group etc. We had a consultant who configured the tables but now we want to move the entire "Payroll interface

  • How to Synchronize two methods or more methods

    HI All, As a java starter in learning Synchronization. how simply can I Synchronize two methods for example I have the following. public class Process {           public static void main(String args[]){ process1(); process2();     private void proces