Determing the type of file on retrieving from BLOB

I want to know the header/ or type of file when i get this field from Oracle BLOB as at run time I dont know which type of file I had uploaded to my BLOB field. I guess every file has some header that recognizes the type of file, now i want to get this information and accordingly set my content type to that. ie. like application/pdf.....or image/gif.......or html/text like that...please help me...

BLOBs are just binary storage, so there's no file associations in it inherently. You'd have to know what the headers of any given file you could add are to be able to recognize them. JPEGs and PDFs certainly have special markers at the start to ID them as that type of file. Certain other files may not. You'd be better off with storing the file by adding your own header before the file data, perhaps with the mime-type.
application/pdf:<file data .... >
That way you can read up to the : and get the mime-type (maybe include the file name in there too).

Similar Messages

  • I cannot save pictures from facebook to "my Pictures" files on my hard drive. There is no place to indicate the type of file, such as jpg etc.

    I have been copying a picture & pasting it on my AOL email & saving photos from Facebook from email . Also, I cannot watch videos posted by my friends on Facebook.
    Firefox works fast on scrolling thru Facebook but I haven't found it to be that helpful for simple things I want to do.
    Thanks for any help you can provide.

    Hi perric,
    On the first issue about pictures.
    * You can set Firefox to ask you where to save the file rather than always using the Downloads folder. This article describes how to set that: [[Startup, home page and download settings]].
    * When you say "there is no place to indicate the type of file, such as jpg etc." is the problem that Facebook isn't including that in the file name and you need to add it? If you could explain this part a bit more.
    * Another way to save pictures is to use the Page Info dialog. While on the page with the images, you can use either:<br><br>* right-click and choose View Page Info > Media<br>* Alt+t (open the classic Tools menu) > Page Info > Media<br><br>As you scroll down the list, you can preview and use the Save As button to save those "hard to get" images.
    On the second issue about videos.
    * Do you see a gray space indicating that you need a plugin? Or does the video not play when you click it? Please explain what you're experiencing in a little more detail.
    * In case you do not have the Flash player plugin for Firefox, you can get it here: http://get.adobe.com/flashplayer/ (make sure to uncheck any unwanted extras that Adobe might offer). If you do the download from IE, you won't get the right version. In that case, use this link to choose the non-IE plugin: http://get.adobe.com/flashplayer/otherversions/
    Hope that helps a bit.

  • Limit on the number of file names retrieved using FM 'RZL_READ_DIR_LOCAL'

    Hi All,
    I am using FM 'RZL_READ_DIR_LOCAL' , to retrieve file names from a specified directory.
    When executed, i am getting 10,000 records(file names) only against lakhs of files present in the directory.
    I would like to know if there is any limitation on the number of file names retrieved using that FM and how to over come it.
    Also please let me know if the FM 'EPS2_GET_DIRECTORY_LISTING' also has any such limitations.
    Thanks in advance,
    Sreeni Vallem

    I did not know about this limitation of number of files returned. You can give a try to the external command way of doing it in your development system.  Well, creating 10001 files in development is a boring job . You can write a sample program as Rob has mentioned in this thread and copy files to a specific directory ABAP: Copy files from one R3 directory to another. This doesn't disturb the existing program written.
    Mean while let's wait for expert's reply.
    Kesav

  • When I try to convert my .pdf to Word, I get a sidebar that has fields for: the name of my pdf file, the type of file I want to convert to (In my case, Word), and a button that says "Convert".  My problem is that the "convert to" field isn't active.  I ca

    When I try to convert my .pdf to Word, I get a sidebar that has fields for: the name of my pdf file, the type of file I want to convert to (In my case, Word), and a button that says "Convert".  My problem is that the "convert to" field isn't active.  I can see the words "Microsoft Word" in pale gray, but when I click on the field, nothing happens.

    You have posted in the wrong forum.  Try posting in the forum for the product you are trying to use.
    Here is a link to a page that has links to all Adobe forums... use the drop down list to see all.
    Forum links page:
    https://forums.adobe.com/welcome

  • What is the types of file store in item Other in Hard disk and how to clear them up for more space

    What is the types of file store in item Other in Hard disk and how to clear them up for more space.
    Thank you in advance for helping..

    See here for answer about the OTHER which is taking up space:
    http://pondini.org/TM/30.html
    and here:
    http://pondini.org/OSX/DiskSpace.html
    See Kappys excellent note on the rest of “other” files taking up your space:
    What is "Other" and What Can I Do About It?

  • Type in value and retrieve from database

    Hi,
    I have a database of clients and to keep it up to date, we will be sending out an email asking them to confirm if they're details are correct and up to date.
    In that email will be a link to a webpage where they can confirm their details are up to date. They will have to type in their email address which will then retrieve their information to update or confirm they are correct.
    I have no trouble updating. I usually list the data and then click on the one that needs updating.
    I'm having trouble retrieving the information after the user has typed in their email address.
    Here is my code so far - at the moment I have listed the data in a table with an "update" link next to each row that allows me to update.
    Where would I put the text field where the user can type in their email? I've tried different ways but was unsuccessful.
    Hope you can help
    Thanks
    <%
    strSQL = "SELECT * FROM emails"
    rsEmail.Open strSQL, conn
    %>
    <html>
    <head><title>All</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="layout.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="wrapper">
      <p>  </p>
      <div id="view">
      <div class="insert"><a href="insertform.html">Insert</a></div>
      </div>
      <table width="1100" cellpadding="5">
        <tr>
          <td width="53">ID</td>
          <td width="300">firstname</td>
          <td width="378">lastname</td>
          <td width="121">email</td>
          <td width="92">Update</td>
          <td width="92">Delete</td>
        </tr>
      </table>
      <table width="1100" cellpadding="5">
        <%
       Do While not rsEmail.EOF
    %>
        <tr><td width="53"><% Response.Write rsEmail("id") %></td>
          <td width="294"><% Response.Write rsEmail("firstname") %></td>
          <td width="374"><% Response.Write rsEmail("lastname") %></td>
          <td width="119"><% Response.Write rsEmail("email") %></td>
          <td width="91"><%  Response.Write ("<a href=""update_form.asp?ID=" & rsEmail("ID") & """>")%>Update<%Response.Write ("</a>") %></td>
        </tr>
        <%
    rsEmail.MoveNext
    Loop
    'Reset server objects
    rsEmail.Close
    Set rsEmail = Nothing
    Set conn = Nothing
    %>
      </table>
    </div>
    </body>
    </html>

    This 'tutorial' is flawed and needs work. Use with care.
    1 - Upload the file correctly. This is NOT an example of how to upload a file from a web page. You need method="post" and enctype="multipart/form-data". Then in the servlet doing the file retrieval you need to get the input stream from the request. Using a library like the jakarta commons File Upload is recommended.
    2 - Database connection should not be done in a JSP. 'nuff said.
    3 - In fact scriptlet code in a JSP is a bad approach in general. avoid.
    4 - A better approach would be to use an ImageServlet as exampled, and just have img tag reference that servlet directly.
    While I applaud the intentions behind wanting to share the code, the code shows several basic design flaws. I think it is a better example of what NOT to do rather than the intended how-to.
    Thats my 2 cents.
    evnafets

  • Hacking into the form values file to retrieve a post after closing a window

    Okay, I'd just finished editing and re-editing a very long post and was doublechecking some of the links when I inadvertedly closed the entire window instead of merely closing the tabbed page I'd brought the new link up on to test it.
    I poked around and found a long binary file called "Form Values" in library/safari directory and I would just bet this has my full post in it. I copied it to the desktop because I had a feeling that if I opened another form with Safari, the info would be rewritten and lost forever. So I do have a safety copy now.
    Anyone have any idea at all how I could retrieve that information, and convert it from binary back into text form so I would not have to spend another two hours remembering and rewriting the post?
    Or a way of getting Safari to recognize it and read it into a new post form?
    Boy, recovering data with a menu item like "undo close window" or a reopen sure would be a nice feature... I bet I'm not the only person that's done this.
    THANKS!!

    I just downloaded Hex Editor and gave myself a trip down memory lane (hadn't used one of these editors since my DOS days). Anyway, as I expected, it looks like the Form Values file is encrypted - there are no recognizable text strings to extract. In any case, this file contains the data you used to fill out forms at particular sites, it does not carry the entire page or form.
    You could try Retrospective to see if you can find the page with the form in Safari's cache. If you do find it, the form could be filled out as when you closed the window or it could be blank as when it was last loaded into Safari - I don't know which because I haven't searched the cache with this puspose in mind before.

  • In the download box, the check box for "always do this for this type of file" is grayed out for the type of file I want, and that application does not appear in the application menu, so how do I set it to perform this function every time?

    The file type in question is InCopy, and the download box acknowledges that program as the type to open it with, but I never want to open it; I always want to save it. This feature works fine with other file types, but not with InCopy. I download thousands of files, so automating this is very important.

    The file type in question is InCopy, and the download box acknowledges that program as the type to open it with, but I never want to open it; I always want to save it. This feature works fine with other file types, but not with InCopy. I download thousands of files, so automating this is very important.

  • Extra line at the end of file when transferred from XI to FTP.

    Hi All,
    Need help regarding the below query.
    I have an inbound structure with the below format
    MT_RAVE_L                     1..1 (is the main node)
          Logistic Info                 1..Unbounded (this is the structure under the main node)
                   LOGSOPTUN      1..1 (this is below Logistic Info field)
          File_Name                   1..1 ( This is also below main node with the same level of Logistic   Info structure)
    (Tried to insert a pic of the mapping but was unsuccesful)
    We are trying to move a file from XI to FTP. the file is being created in FTP succesfully but an extra blank line is being inserted at the end of the file.
    After lot of investigation we could trace the it is because of the File_Name field data is being not moved to inbound file.( Here we are using the File_Name field data for creating a file name in FTP. i.e., the File_Name is the File name under which our data is being stored in FTP and that is the reason we are not using File_Name in Content Conversion)
    Can you please suggest ways so that the empty line is not created.
    Thanks in advance
    LRK.

    Hello,
    Have you set the property in  File adapter lastFieldOptional.
    Thanks and Regards
    Hemant

  • Will the transfer of files be straightforward from the old version to CS6?

    I’ve been using DW MX 2004 since, well 2004 and now thinking about CS6. But is the transfer of files from the old version to the new going to be problem free? I notice that CS6 has liquid layout, and am thinking how my existing templates are going to respond.
    Also, DW MX allowed me to use the software on the PC and laptop on the one licence, would this still be permissible does anyone know? I would only be the only user and the software would never be run at the same time on both machines.

    HTML is HTML, so DW will have no problem reading or using your old files, including your old template files (although template syntax has changed radically - I forget whether DW will automatically upgrade your templates or not). Are you going to install the CS6 on the same computer that is running MX2004? If so, then your sites should transfer as well. But just to be safe, you should use Site Manager in MX2004 to export the site definitions of ALL your sites (including the FTP info) to a safe place on your computer so that you can then import those definitions into CS6. Your sites' files themselves will not be affected by this update.
    Be aware that CS6 is VERY VERY different than MX2004. You must bring a fair familiarity with HTML and CSS to the table when you are using CS6. Many of the things that you could do in MX2004 will require the use of CSS to do in CS6. In addition, CS6 is very focused on valid HTML, and you must bring some familiarity of that too.

  • How to print JPG image retrieved from BLOB in a table using Forms10g

    I create a database schema and a Form to maintain JPG to the table PHOTOS.
    I would like to add a button to PRINT just the PHOTO_IMAGE to its maximum size from a Form. How can I do that? Is thaere any built-in Forms functions to do that? If the client is using Windows XP, can I use CLIENT_HOST() to call a program to print the JPG file directly?
    Any suggestion is welcome.
    -- myphotos.sql
    drop user myphoto cascade;
    create user myphoto identified by myphoto;
    grant connect, resource, ctxapp to myphoto;
    connect myphoto/myphoto@orcl;
    PROMPT Creating Table USERS
    CREATE TABLE USERS
    (USER_ID VARCHAR2(8) NOT NULL,
    USER_LASTNAME VARCHAR2(15) NOT NULL,
    USER_FIRSTNAME VARCHAR2(30) NOT NULL,
    USER_PASSWORD VARCHAR2(20) NOT NULL,
    CONSTRAINT PK_USERS PRIMARY KEY (USER_ID)
    PROMPT Creating Table PHOTOS
    CREATE TABLE PHOTOS
    (PHOTO_ID VARCHAR2(15) NOT NULL,
    PHOTO_IMAGE BLOB,
    TEXT_DESCRIPTION CLOB,
    FILENAME VARCHAR2(50),
    FILE_SIZE NUMBER NOT NULL,
    USER_ID VARCHAR2(8) NOT NULL,
    ACCESS_RIGHT VARCHAR2(7) NOT NULL,
    CONSTRAINT CK_ACCESS_RIGHT CHECK (ACCESS_RIGHT IN ('PRIVATE', 'PUBLIC')),
    CONSTRAINT PK_PHOTOS PRIMARY KEY (PHOTO_ID),
    CONSTRAINT FK_USER_ID FOREIGN KEY (USER_ID) REFERENCES USERS (USER_ID)
    create index idx_photos_text_desc on
    PHOTOS(TEXT_DESCRIPTION) indextype is ctxsys.context;
    INSERT INTO USERS VALUES ('G345566A','WONG', 'TAI SIN','WONGTAISIN');
    INSERT INTO PHOTOS VALUES
    ('P00000000000001', empty_blob(), empty_clob(),
    'SCGP1.JPG',100,'G345566A','PUBLIC');
    INSERT INTO PHOTOS VALUES
    ('P00000000000002', empty_blob(), 'Cold Play with me at the concert in Melbourne 2005',
    'COLDPLAY1.JPG',200,'G345566A','PUBLIC');
    INSERT INTO PHOTOS VALUES
    ('P00000000000003', empty_blob(), 'My parents in Melbourne 2001',
    'COLDPLAY1.JPG',200,'G345566A','PRIVATE');
    COMMIT;
    EXEC CTX_DDL.SYNC_INDEX('idx_photos_text_desc');
    SELECT USER_ID,PHOTO_ID ,TEXT_DESCRIPTION
    FROM PHOTOS
    ORDER BY USER_ID;
    SELECT score(1),PHOTO_ID ,TEXT_DESCRIPTION
    FROM PHOTOS
    WHERE CONTAINS(TEXT_DESCRIPTION,'parents',1)> 0
    ORDER BY USER_ID,score(1) DESC;
    SELECT USER_ID,score(1),PHOTO_ID ,TEXT_DESCRIPTION
    FROM PHOTOS
    WHERE CONTAINS(TEXT_DESCRIPTION,'cold play',1)> 0
    ORDER BY USER_ID,score(1) DESC;
    SELECT USER_ID,score(1),score(2), PHOTO_ID ,TEXT_DESCRIPTION
    FROM photos
    WHERE ACCESS_RIGHT='PUBLIC'
    AND CONTAINS(TEXT_DESCRIPTION,'Melbourne',1)> 0
    AND CONTAINS(TEXT_DESCRIPTION,'2005',2)> 0
    ORDER BY USER_ID,score(1) DESC;

    I use a third part product to do this (irfanview.exe).
    This tool allows to do some batch operation /print to print the file)
    Francois

  • I can't import movies from my JVC GZ-MS230BU (Everio) to iMovie or iPhoto. The type of file doesn't seem to import to MAC, mod and moi files, in a way that iMovie can do anything. Any ideas?

    I looked up answers about other JVC import issues, but didn't find anything relevant. Thanks for any suggestions and help!

    Use MPEG Streamclip to convert the MOD files to QuickTime.

  • The WSDL data cannot be retrieve from remote site

    I am a new guy learning web services with NetBeans 5.5 and meet some problem in retrieving wsdl data from remote site.
    I create a web service "WSTestServer" at Sun Application Server PE8.2 with real IP, say 111.110.11.10:8888, and there's a class "TestWS" with a method "getWS" to return a String. The server (or machine) name is ultra20. So, by following steps in NetBeans, I can get a wsdl file after generating the web service and it can be viewed at
    http://111.110.11.10:8888/WSTestServer/TestWS?WSDL
    Then, I create a web service client at the same machine, it is available to test this method by clicking Web Service Reference item in NetBeans and select "getWS" method to get that String.
    However, when I create a web service client at remote site, it doesn't work and show exception message like
    cannot find domain http://ultra20:8888/WSTestServer/TestWS....
    I go back to check wsdl file, at the last line, it prints like
    <soap:address location="http://ultra20:8888/WSTestServer/TestWS".....
    If I test this case in LAN, e.g., the server IP becomes 192.168.1.2 and client IP is 192.168.1.3, then it works since machine name can be recognized within the same local area network. I try to revise the wsdl file above to replace machine name as real IP, but it is automatically changed back with machine name while deploying and copy the revised one as xxx.wsdl__orig.
    Should I do additional configuration setup for server site? Such as, registering a domain name like aaa.bbb.edu instead of 111.110.11.10?
    Any comment and help for this subject is appreciated!!
    Thank you so much!

    Works as designed,from documentation:
    The database also retrieves all triggers and constraints defined on the table except for referential integrity constraints that reference other tables.
    The retrieved indexes, triggers, and constraints have recycle bin names. Therefore it is advisable to query the USER_RECYCLEBIN view before issuing a FLASHBACK TABLE ... TO BEFORE DROP statement so that you can rename the retrieved triggers and constraints to more usable names.
    For details see the FLASHBACK TABLE command description for your unknown database version.
    Werner

  • HELP please, missing the Thumbdatabase.db3 file; actions disappear from Effects Panel

    I hope someone can help me, I'm totally frustrated and confused.  Whenever I install a new action, previously installed actions disappear from the Effects Panel!  Does anyone know what's happening and how to fix it?  Also, I have no ThumbDatabase.db3 file in the folder: Photoshop Elements 7.0/Locale/en_US    Shouldn't it be there?  Can anyone help me with both these issues?  Thanks so much.

    TexasErin, you have solved the whole problem!!!!   You have me jumping for joy!  I've been dealing with this for three days and ready to give up entirely, completely discouraged that no one seemed to know the cause or how to fix this "case of the disappearing actions"!  (BTW, I found the missing ThumbDatabase.db3 file in the Photshop Elements\ 7.0 folder.  But I had to click the 7 and completely open the folder to see it.  It was not visible in the "tree" on the left side of the panel where all the drives/folers are displayed.)
    Your answer completely nailed the issues and fixed them!  Most helpful was your suggestion to paste actions directly into the Photo Effects folder, and NOT put actions into their own folders in Photo Effects.  I made that mistake and had about 3 folders containing actions in Photo Effects.  I got rid of them, pasted all the ATN, PNG and XMLs directly into Photo Effects.  I deleted the MediaDatabase.db3, started PSE, and waited a minimum of 30 minutes for it rebuild.
    That was another piece of very helpful advice you gave -- to wait unitl the rebuilding message disappears, cursor returns to normal, etc.  Your entire answer was so clear and precise and right on target, I'm going to print it and hang it on my wall.  Are you one of the Adobe Experts?  You definitely sound like one, or should be considered one if not!  I'm SO grateful, thanks a million!!! 

  • How to get the name of file was read from file adapter ?

    Hello!
    I make a pooling into one directory to read all *.fat files in this directory, and I want the name of this file
    is it possible ?
    God bless all!

    it is mentioned in the sample code.. look at the pdf guide inthe sample code document for file adapter.
    you need to define a variable of message type of the file adapter inbound header message type and assign the variable to the apapters tab in the receive activity..
    the variable will have file name now

Maybe you are looking for