Mime-type of picture in xstring

Hi,
I have an xstring with a picture. How can I get a mime type of this picture in ABAP?
Thank you.
Regards
Michal

look to fm WWW_GET_MIME_OBJECT
and sample program RSDEMO_PICTURE_CONTROL
A.

Similar Messages

  • Libreoffice mime-type icons

    Hi,
    i'm curious to know if i'm the only that have ugly mime-type icons for LibreOffice files (.odt .doc .ods ...)
    Before
    I like to see the original LibreOffice mime-type icons, so after a lot of research on the web i've found the solution.
    Following this http://standards.freedesktop.org/shared … atest.html
    The applications mime-type action are stored under /usr/share/mime/packages.
    Here you can find /usr/share/mime/packages/libreoffice.xml the LibreOffice mime-type file and if you open it you'll find something like that:
    <mime-type type="application/vnd.oasis.opendocument.text">
    <comment>OpenDocument Text</comment>
    <glob pattern="*.odt"/>
    <magic>
    <match type="string" offset="38" value="application/vnd.oasis.opendocument.text"/>
    </magic>
    </mime-type>
    In order to see the original icon in Nautilus / Dolphin you simply have to add a line of code that call the proper mime-type icon for example:
    <icon name="libreoffice-oasis-text"/>
    You have to do this for every mime-type type.
    The follow example is for "OpenDocument Text"
    <mime-type type="application/vnd.oasis.opendocument.text">
    <comment>OpenDocument Text</comment>
    <glob pattern="*.odt"/>
    <icon name="libreoffice-oasis-text"/>
    <magic>
    <match type="string" offset="38" value="application/vnd.oasis.opendocument.text"/>
    </magic>
    </mime-type>
    And after this work you can see something like this in Nautilus / Dolphin
    After
    If someone if interested i can post the updated libreoffice.xml file.
    mod edit: Hello gspe, please read Forum Etiquette: Pasting Pictures and Code. Thanks. --fsckd
    Last edited by fsckd (2011-11-07 20:05:21)

    After a bit more research i've found the correct solution for the problem.
    The problem actually is that the libreoffice mime-type icons follow a wrong naming.
    For example if you go in /usr/share/icons/gnome/48x48/mimetypes
    libreoffice-oasis-text.png
    shoud be
    application-vnd.oasis.opendocument.text.png
    And so on for all entry in /usr/share/mime/packages/libreoffice.xml

  • Exporting AAC m4a podcast mime type problem

    Hi All,
    I have a podcast that I use GB3 to produce the enhanced podcast with (artwork podcast with links).
    When I upload this file to my server it shows up as application/octet-stream for mime type. The extension is still m4a but the desktop icon is now a quicktime movie whereas in the past it was always an iTunes icon, when I used ChapterToolMe, for instance.
    As a result my podcast/rss feed on the iTMS no longer updates the more recent shows (i've tried all the tricks to get that end of things working)
    I'm guessing there is some setting in GB3 that is changing the mime-type behind the scenes under the GUI. Can anyone suggest anything? Converting in iTunes all over again?

    Nathan,
    I wonder if you've found a solution yet? I'm having the same issue with my picture and link enhanced podcast. Whenever i post an m4a to my RSS feed, it breaks my subscription in iTunes????
    I hope someone has some knowledge on a fix for this.
    Adam

  • "don't have a plug-in for this MIME type" - what can I do?

    I am a new Mac user and am finding that I can't access a lot of content on the web due to the error that says a certain page "has content of MIME type...(fill in the blank) and because you don't have a plug-in installed for this MIME type, this content can't be displayed."
    It is very frustrating because I can't quick upload pictures on Snapfish or open pretty much most video clips on the web. What good is my fancy new Mac if I can't do this stuff anymore?!
    The Mac people suggested I switch browsers from Safari to Firefox, but that did not help. Any suggestions?

    Yes, I have installed Snapfish's quickupload. I have gone through the upload and install process a few times, so I know that it has been installed. For some reason, I still get the error message I quoted above. On other websites, I just get the error message with no option to install any sort of plug in. Still stuck!

  • No object DCH for MIME type multipart/related

    Hi, everyone!!!
    When I execute my code, I got this exception:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/related
    boundary="----=_Part_0_20851530.1186777547859"
    the funny things is : I got it work before. However, when I come back a few days to run, it doesn't.
    I use tomcat 5.0,
    mail.jar: version: 1.6
    activation.jar:version: I don't know but I download the new ones in sun website.
    Note: Also, when I run the code below in standalone application (java application), it works but doesn't work on tomcat application
    Any help would be appreciate.
    I tried some helps tips from other website such as http://www.jguru.com/faq/view.jsp?EID=237257
    and still doesn't work :((((
    ***********Here is my code**********
    ********props is properties file...............
    Authenticator auth = new SMTPAuthenticator();
              // Get session
              Session session = Session.getDefaultInstance(props, auth);
              session.setDebug(true);
              // Create the message
              Message message = new MimeMessage(session);
              // Fill its headers
              message.setSubject(subject);
              message.setFrom(new InternetAddress(from));
    for(int x=0;x<recipients.size();x++)
         message.addRecipient(Message.RecipientType.TO, new InternetAddress(recipients.get(x).toString()));
                        // Create your new message part
                        BodyPart messBodyPart=new MimeBodyPart();
                        // Set the HTML content, be sure it references the attachment
                        String htmlText="<h1>Hi</h1>"+"<img src=\"cid:picture\">";
                        // Set the content of the body part
                        messBodyPart.setContent(htmlText, "text/html");
                        // Create a related multi-part to combine the parts
                        MimeMultipart multipart=new MimeMultipart("related");
                        // Add body part to multipart
                        multipart.addBodyPart(messBodyPart);
                        // Create part for the image
                        messBodyPart=new MimeBodyPart();
                        // Fetch the image and associate to part
                        System.out.println("before dataSource");
                        DataSource fds=new FileDataSource(this.getString("image_location"));
                        System.out.println("After dataSource");
                        messBodyPart.setDataHandler(new DataHandler(fds));
                        System.out.println("*************** dataSource");
                        // Add a header to connect to the HTML
                        messBodyPart.setHeader("Content-ID", "<picture>");
                        // Add part to multi-part
                        multipart.addBodyPart(messBodyPart);
                        // Associate multi-part with message
                        message.setContent(multipart);
                        // Send message
                        System.out.println("Before Send");
                        Transport.send(message);
                        System.out.println("Finish");
    }

    Thank you for your response!!!
    I already found the solution. For those who still having problem send e-mail, make sure to put mail.jar and activation.jar in the same location.
    Also, make sure to check catalina.xml to make sure those jars are same location!!!->That what I found out.
    ->I put jars in same location of my eclipse project but it turns out, the tomcat app server didn't put them in same location.
    Anyway, Thank you java_2006 for your response!!!!!
    :)

  • 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

  • How can I use one Add-on prior to another for specific MIME-types?

    I'm using Shockwave Flash plugin to watch some videos on YouTube, StreamCloud, etc. It also handles .mkv and .mp4 files/streams. After installing VLC Web plugin to handle MIME-types like mp3/4, mkv additionally and prior to the Flash plugin, Firefox keeps using Flash to handle those types insted. I cannot find options to set the desired priorities. Only disabling the Flash plugin solves my problem, but also keeps me from watching Flash contents, which Is not acceptable.
    Did I miss something or is this Firefox's fault?

    If you type or paste '''about:plugins''' in the address bar and press Enter, you can see which plugins are associated which various content types.
    I do not know how to prioritize one over the other for the same content type if the plugin settings (plugins often have an interface outside of Firefox to adjust their settings) do not allow that.
    As for MP4, I don't think Flash normally would be selected. I suspect the website is specifying a Flash media player and streaming the MP4 through that. If you want to hide the Flash plugin from a particular website, you can use the Permissions tab of the Page Info dialog.
    Click the padlock or globe icon in the address bar, then More Information, then Permissions. The top section of the Permissions panel should be "Activate Plugins". Here you can select Block for Flash for the current site. After reloading the page, does the media play using a different plugin?

  • Unable to launch application from my machine:Bad MIME Type

    Hi,
    The following error message was printed when I tried to access the SwingSet2 demo from the Java Web Start site.
    An error occurred while launching/running the application.
    Title: SwingSet2
    Vendor: Sun Microsystems, Inc.
    Category: Download Error
    Bad MIME type returned from server when accessing resource: http://java.sun.com/products/javawebstart/apps/SwingSet2.jnlp - text/html
    Can you please suggest what is to be done to rectufy this problem?
    Regards,
    Satish

    Bad MIME type returned from server when accessing
    resource:
    http://java.sun.com/products/javawebstart/apps/SwingSet
    .jnlp - text/htmlit should return application/x-java-jnlp-file.
    My guess is that you use proxy which messes up headers.
    Otherwise try to reinstall Web Start, then enable the console and log output in Web Start's advanced preferences to get more clues what's going on.
    Regards,
    Marc

  • How to change default application associated with some mime types?

    When we install some new program, for example GIMP, I assume the newly installed program is added to some mime type database, and the /usr/share/applications/mimeinfo.cache file is automatically generated.
    Using my example, GIMP will be the default application for all its registered mime types, even application/pdf. I surely don't want this to happen, and I surely don't want to create all kinds of files that GIMP registered and right click on them and choose Properties and then change it in the Open with... tab. I want to systematically de-prioritize GIMP so that it will not override my previously assigned default applications.
    I wrote a script to modify the mimeinfo.cache file, and it seems to work great. However, after a reboot or upgrade or something I didn't notice, the default application of application/pdf is reconfigured to GIMP. I think the cache suffix of the file indicates that it is just a cache and may be changed by system unnoticed. So I am looking for a new way to change the default applications.
    As far as I know or guess from the phenomena, there should be some system utility that generates the mimeinfo.cache file, it seems to parse all the *.desktop files under /usr/share/applications and register them to certain mime types accordingly. The sequence of the *.desktop files get parsed seems to be related to the time the application is installed, and the newly installed applications seems to be parsed later and inserted in the front of the application list or be parsed earlier and appended to the application list. Is there some place I can change the sequence of the parsing? Or is there some place I can change the behavior of the system utility?
    I know that I can populate my ~/.local/share/applications/mimeapps.list to override the system wide defaults, however, I want a more elegant way to this.
    Any opinion on this is welcomed.
    Last edited by AugustePop (2010-05-14 05:47:15)

    Ah, right. Don't know what DE you are on, but in Gnome:  right-click a (e.g. pdf) file -> Preferences -> Open with.
    All Applications listed there will be available from the right click menu, the marked one will be used on double-click.
    errgrh...
    I surely don't want to create all kinds of files that GIMP registered and right click on them and choose Properties and then change it in the Open with... tab. I want to systematically de-prioritize GIMP so that it will not override my previously assigned default applications.
    I guess what I am trying to propose is this: "de-prioritize" GIMP in its .dekstop file for the types you dont want it to be associated with, and manually add it back in through "Open With" for the file types you want it to be an option. Not sure if this is solving anything for you though
    Last edited by hokasch (2010-05-14 10:28:57)

  • File/Open Dialog Box / Setting MIME type

    In my application, I am calling a web service that returns text that I need to download into an EDI application. I am simply looking to have an open/file dialog box open when the text is returned. I was using the following code in a PL/SQL process:
    begin
    -- Set the MIME type
    owa_util.mime_header( 'application/octet', FALSE );
    -- Set the name of the file
    htp.p('Content-Disposition: attachment; filename="EDIOuput.edi"');
    -- Close the HTTP Header
    owa_util.http_header_close;
    end;
    The problem is the HTML code that comes along with the text that is returned. Is there a way to simple call the procedure on a page that only containes the raw data?
    Thank you.

    HTML doesn't provide you the possibility to select multiple files or select folders at a single browse. Thus JSF can't do any much for you. Best what you can do is to write a signed applet or web start application which does the task. The Mojarra Scales component library has a ready-to-use component which embeds an applet which does that task. Check [https://scales.dev.java.net/multiFileUpload.html].

  • Print HTML using JPS API.. How to configure printer MIME-TYPE as text/html

    Hi All,
    I have to print the HTML pages.. for this i have used JPS API , but i found that my printer doesnt supoort Mime-type(Flavour) text/html.
    Can someone help me in this ...
    i) Can i configure my printer for this Mime-type , if yes then HOW?
    ii) Is there any work around ?
    Thank you all in advance :)

    I reposted this question in the Database forum. Admin can feel free to delete this thread.
    The answer is to add this at the top: htp.addDefaultHTMLHdr(false);
    Thanks,
    T.
    Edited by: 855677 on May 3, 2011 9:35 AM

  • How To Get FileType and MIME Type from a File

    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.
    Can any one help me on this.
    Thanks in advance,
    Ram.
    Edited by: javausers07 on Apr 15, 2009 4:25 PM

    javausers07 wrote:
    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);Why do you do all above?
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.That's because there's no way to get MIME type of all files on all filesystems.
    Kaj

  • How to restrict uploading files by mime type?

    Hi,
    I have been searching the forum (and Google) looking for tips on how to ensure users can only upload files of specific formats (Word, PDF, etc) for specific document types as defined within the application (e.g. Curriculum Vitae (Word), Copy of Transcripts (PDF)).
    While I have used this research to start work on a server-side solution, I would like to know if there is an apex-friendly way to "validate" a file-browse item based on mime-type.
    Has anyone else had to address this?
    Ted

    Hi,
    I would like to know if there is an apex-friendly way to "validate" a file-browse item based on mime-typeHow about, you create a check constraint on your MIMETYPE column. something similar to this:
    alter table "MY_TABLE" add constraint
    "MY_TABLE_CON" check ( "MIMETYPE" = 'application/pdf' or "MIMETYPE" = ......)Or you can use this plugin, provided using browsers supporting HTML 5:
    http://www.theapexfreelancer.com/apex/f?p=APEXFREELANCER:FILE_UPLOAD:0
    For friendly,
    Please check error handling :
    http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
    Best Regards,
    Fateh

  • Need to get the MIME type of Files

    hi
    I have a table which contains Partno and the images name i.e PRODUCT_AWG_20070416 and the data would be like that :-
    partno img_name
    PX1 px1.jpeg
    PX2 px2.jpeg
    PX3 px3.jpeg
    Now one by one i am Inserting those files into my table (img_temp -BLOB Column) which are exists in directory & the map file. but i also need to insert the MIME type of the inserted file. can you please provide me the way to generate MIME type on the basis of file type like (JPG,GIF,TXT etc).
    the procedure i am using is as follows :
    hi
    I have a TABLE which contains Partno AND THE IMAGES NAME i.e PRODUCT_AWG_20070416 AND THE DATA would be LIKE that :-
    partno img_name
    PX1 px1.jpeg
    PX2 px2.jpeg
    PX3 px3.jpeg
    Now one BY one i am INSERTING those files INTO my TABLE (img_temp -BLOB COLUMN) which are EXISTS IN DIRECTORY & THE map FILE. but i also need TO INSERT THE MIME TYPE OF THE inserted FILE. can you please provide me THE way TO generate MIME TYPE ON THE basis OF FILE TYPE LIKE (JPG,GIF,TXT etc).
    the reason of this requirement is, we need to use that table in APEX 2.2 fromwhere i can download the inserted file and to download the file we need to get correct MIME_TYPE of that file.
    Please Suggest me the way.
    Thanks.
    The Procedure which i am using is as follows :
    CREATE OR REPLACE PROCEDURE img_uploader IS
    CURSOR Cur_img IS SELECT part_no,image_file FROM PRODUCT_AWG_20070416
                             WHERE Transaction_id =1 ;
    l_bfile BFILE;
    l_blob BLOB;
    BEGIN
    FOR Cur_img_val IN Cur_img LOOP
    l_bfile := BFILENAME('SOLVS_PRODUCT_IMG', Cur_img_val.image_file);
    INSERT INTO img_temp (part_no,MIME_type,file_name, img)
    VALUES (Cur_img_val.Part_no,NULL, Cur_img_val.image_file,EMPTY_BLOB())
    RETURN img INTO l_blob;
    DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
    DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
    DBMS_LOB.fileclose(l_bfile);
    END LOOP ;
    COMMIT;
    END;

    Hello,
    Perhaps this can help:
    http://help.sap.com/saphelp_nw04/helpdata/en/ad/ebe5cc1d75aa43a2871717d76f475d/content.htm
    If you want to know the table name, turn on tracing (ST05) when accessing the MIME types.
    regards
    Rick Bakker
    Hanabi Technology

  • How to get the Mime Type of the file?

    Hi Everyone!,
    I want to upload a random file into my table as a BLOB and simultaneously want to fill the respective another column with its MimeType. Earlier I used Oracle Apex for this, but due to my new requirement I need to make this happen with the help of PL SQL and Forms. Could you help me in getting how we can upload the file and most importantly, how we can get its Mime-Type.
    My chosen file can be of any type; it can be doc ,pdf,txt,xls ,gif or any other format.
    If you could provide the example with your reply then it would be great.
    Thanks
    Harbinder

    hi
    for that u have to use webutil.
    declare
          f varchar2(100);
    begin
         f := webutil_file.file_open_dialog();
         if f is not null then
              :doc.doc_name := f;
              end if;
         end;and
         DECLARE
    filename VARCHAR2(256);
    BEGIN
    filename := CLIENT_GET_FILE_NAME (File_Filter => 'jpg (*.jpg)|*.*|');
    READ_IMAGE_FILE(filename, 'jpg', 'image');
    END; sarah

Maybe you are looking for

  • How can I  connect to SQL server database thru local network by using JSP?

    I'm currently doing a project by using JSP..And I need to display record from the SQL Server database in our school's local network. May I know how can I do that? How can I write the code so that I can able to access the SQL Server databsase Throught

  • Capture recorded tv programs on my sky+ with imovie

    Hi I have a sky+ (pvr) box which has a function to allow a dvd recorder to record programs on it's hard drive. From what I can see the box simply plays them for the dvd recorder to record. My question is this - is it possible to wire a sky+ box to my

  • Automatic payment flow isnu00B4t working

    Hi Team, I got the below requirement from my user. But i dont think if the customer is marked for deletion the automatic payment run will work. I need your advice and how to resolve this issue. Regards, Jana Can you please advice if a customer is mar

  • Undeploying Library Project

    Hello, is there another possibility to undeploy a library project as using the sdm (RemotGUI)? Problem is, when starting the RemoteGUI and selecting the undeployment-TAB the remoteGUI seems to hang. No more action can be done. I also removed the jar-

  • Export to powerpoint not working for certain views

    Hi All, I am in the process of implementation of STVN 2.1 Pre EHP3 version of Nakisa OrgChart for one of my clients. During testing, it is observed that export to powerpoint object is not working for the following views. 1. Condensed Org. Chart 2. Co