How do I determine type?

I'm working on a project where I would like users to be able to upload multimedia (audio, video, images) into the database using a web form, but I'm having some problems. Once a user has uploaded something, I need to figure out if it is an image, audio clip, or video so that I can create an OrdImage, OrdAudio, or OrdVideo. Does Oracle provide anything that will allow me to do this? I know I could use Java to check the MIME type of the uploaded file, but it seems to rely on the file extension to determine the MIME, and this doesn't seem especially reliable.
Thanks for the help!

Hi,
I think what you really need here is the new ORDSYS.ORDDoc type, introduced in Oracle9i. The ORDDoc type is designed to hold media of any type (image, audio, or video), and can determine the MIME type of any recognized format. However, as I said, that is new with Oracle9i.
For Oracle8i, you have a number of choices. One option would be to upload the data to a temporary BLOB, then use the interMedia relational interface to determine its type by calling the image, audio and video setProperties method. When one of the setProperties methods recognizes the format, you could store the data in an ORDSYS object of the appropriate type. Another approach might be to always store the data in a table in a BLOB, and always access and process the data using the relational interface.
Having said that, please be aware that interMedia doesn't recognize all media formats, although we are adding new ones all the time. For example, new ones were added in Oracle8i 8.1.7 and in Oracle9i 9.0.1.
Therefore, for those formats that interMedia doesn't recognize, you really have no option but to rely on the MIME type supplied by the browser, which is indeed based on the file name extension of an uploaded file. In fact, interMedia Java Classes for Servlets and JSPs does just this for unrecognized formats. If a call to setProperties fails, the store methods will use the browser-supplied value to set the mimeType attribute.
In summary, if its likely that users will be mucking about with file name extensions, then I'd go with using the relational interface, in one manner or another, at least for 8i; for 9i, there's ORDDoc. Alternatively, generally speaking, using the media type component of the browser-supplied MIME type, will typically work in most cases.
Hope that helps.
In order to better understand the variety of ways in which our customers are using interMedia, we'd be very interested in knowing a little more about your application, the interMedia functionality that you are using, how you are developing and deploying your application, and any new functionality you'd like to see added to Oracle interMedia. If you are able to help us, please send a short email message with some information about your application, together with any comments you may have, to the Oracle interMedia Product Manager, Joe Mauro, at [email protected]. Thank you!
Regards,
Simon
null

Similar Messages

  • How does acrobate determine type of field in Acrobate 9 Pro?

    I have a form that I changed to a pfd.  Some of the boxes are text, others are set a check boxes.  Does anyone know what is used to determine what type of box they are made?

    With check boxes, one can unselect a checked item and none will be checked. Radio Buttons, on the other hand, once selected will always have a radio button selected.
    You can also specify field limits. use pre-defined text formats to force zip code and phone number and use a combo box to control selections for a limited number of items like gender M/F.

  • How to programatically determine type of controls in a cluster

    Hello All,
    This is my second post. Am using LabVIEW 8.6.
    Am developing software to automate test system and also generate a professional report. My approach here is to make the report very much auto configured as per GUI design (in short changes in GUI programatically gets reflected in Report format), so as to have easy configurability.
    To achieve this I should be programmatically be able to determine the type of control each cluster has and act accordingly. A cluster may have a set of controls and as well another cluster. This way I can put in a for loop and need not worry about any increment or decrement of element in the cluster!
    I have access to “Controls[]” in property node of the cluster, but am unable to find a way to determine which type of control it is – Boolean (True/False), Text, Ring, Combolist, etc. If I get hold of this then I can put them in a for loop and take action on all controls present in the cluster depending on the type of control - Not all, there will be a default to take care of non-utilised controls and shall update as required!
    Am just guessing - will variant be a solution to this or am wrong?
    Also will it be possible to remove border visibility of a cluster in front panel, so I can have a structured program without getting reflected in front panel?
    Hope to get a response.
    Thanks and Regards,
    Tirthankar De
    Solved!
    Go to Solution.

    If you want to use the Controls[] property have a look at the 'Class' value of each reference:
    To remove the border of (any) modern control, right click the border, select the brush tool, select the Transparant value (upper right corner), if you still see a little border hit 'Space' to select front and background color.
    To see what can be done with the variant data from a control have a look at this custom probe. Where I use OpenG tools to get all the possible info on the data.
    Ton
    Message Edited by TonP on 12-11-2008 09:38 PM
    Message Edited by TonP on 12-11-2008 09:39 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    GetClusterContent.png ‏12 KB

  • How does hibernate determine type of an empty collection elements?

    Consider we've got an instance of a class like this:
    @Entity
    class MyClass {
    @ManyToMany
    List<MyClass2> theList = new LinkedList<MyClass2>();
    public List<MyClass2> getTheList() { return theList; }
    public void setTheList( List<MyClass2> theList ) { this.theList = theList; }
    .. id and its getter and setter here ..
    As far as I know generic collection's type is erased after compilation. Therefore hibernate sees a raw-type collection in runtime. But it maps this many-to-many association from MyClass to MyClass2 correctly even if the list is empty. And in java persistence API documentation "targetEntity" property in @ManyToMany is optional also. It says "Default: the parameterized type of the Collection when defined using generics".
    So there should be another way to determine collection element's type in runtime. Could anybody explain it to me?

    The compiled class file still contains the information. Therefore you can get the generic type information for fields (using Field.getGenericType).
    Objects on the other hand, don't contain that information.

  • How can I determine the type of video out connector I need?

    Howdy,
    I have a white macbook purchased Jun/2008. I want to connect to a TV but don't know what adapter I need. How can I determine the type of video out jack my macbook has?
    System Profiler says the model identifier is "MacBook 4,1". Under Graphics/Displays the only thing it says about the "Display Connector" is that no display is connected. Too bad it doesn't tell me what type of connector it is. If I knew the name of the connector I'd probably be home free. But it seems like every macbook model has a different video connector (since the state of the art has advanced over the years) and I haven't been able to keep up with the names.
    Now, I have a 6" long adapter that will convert this connector to VGA. And searching the Apple store for VGA adapters, the existence of mine says my connector is might be one of "Mini DisplayPort", "Apple Mini DVI", "Apple DVI", or "Apple Micro-DVI". But then there is also the connector at
    http://store.apple.com/us/product/M8639G/A?mco=MTY3ODQ5OTY
    and that looks like the one I have. But unlike the other adapters, this one is just called a "VGA Display Adapter". Does the connector have a name? How can I find adapters that have that same connector?
    I know I could use the adapter I have, plus a VGA to VGA cable, to hook up to a TV. But the quality of the VGA signal is poor in the digital world. My goal is to hook up to the TV via HDMI. Is this even possible? By which I mean, will my macbook generate the signals necessary to be able to be converted to HDMI?
    Thanks for any help,
    Zebulon T

    Thanks, Ded,
    You're right, the cable that I have won't work. I't from my previous, 2004 iBook. This is pretty embarrassing... I looked at the cable but didn't bother to try plugging it in.
    Looking at the close-up picture of the Mini-DVI to VGA adapter, that does look like the right connector. So I have Mini-DVI, and the other apter you pointed to can convert this to DVI. I'll take a look to see what makes the most sense, connector wise, downstream from that.
    Thanks very much.
    Zeb T

  • Mailexample.sql how do you determine the file type?

    I'm using the mailexample.sql which explains how to use the demo_mail wrapper package for utl_smtp. There's a procedure for attaching text files and a procedure for attaching binary files. I've got binary files to attach to email successfully.
    How can I determine the file type so that I can use the attach_text procedure when attaching text files rather than the procedure for attaching binary files?
    Sandy

    Watch out! I think there is a bug in that code :-
    bug with PL/SQL Sample - maildemo.sql
    To answer your question - the usual way of determining a file type is to look for 'magic numbers' in the file that indicate its type. For example, Windows exe files often (always?) begin with the two letters 'MZ'. Zip files begin with 'PK'; Rar archives begin with 'Rar!'. Text files can begin with anything, and do not have any characteristic marker, but USASCII7 (which is what the format that routine is designed for - I think), is a characterset that only uses the first 7 bits of the byte. You could read the file, and if you find any bytes > 127, then you know it is not a USASCII7 file. I have seen various programs that 'sample' the first 64 or 256 bytes of a file instead of reading the whole file, and they usually get it right.
    Hope this helps.
    Takmeister

  • How the system determines the Requirement type  for one sales order

    Hi,
    SAP-SD Gurus,
    Please tell me how the system determines the Requirement type  for one sales order?
    Thanks & Regards,
    Sreenivas.P

    Hi,
    System follows some search criterial to determine the requirement type
    1. First, an attempt is made to find a requirements type using the strategy group in the material master.
    2. If the strategy group has not been maintained, the system will determine it using the MRP group.
    3. If the MRP group has not been defined, the system uses the material type instead of the MRP group when accessing the corresponding control tables.
    4. If no requirements type is found here, the system assumes a special rule and attempts to find a requirements type with the aid of the item category and the MRP type.
    5. If this is not possible, a last attempt is made to find a requirements type with the item category only.
    6. If the last attempt fails, the system declares the transaction as not relevant for the availability check or transfer of requirements.
    Please check the path
    SPRO->SALES & DISTRIBUTIONS->BASIC FUNCTIONS>AVAILABILITY CHECK AND TOR->TRANSFER OF REQUIREMENTS--->DETERMINATION OF REQUIREMENT TYPE USING TRANSACTION.
    Hope it will clarify
    regards,
    santosh

  • How to determine type and access of REF TO DATA

    Hello experts,
    I have a structure with two fields, one string as name/ID and the second one REF TO DATA as placeholder for any value, so DATA can take for example another string or a numeric value or whatever. Ok, now I want to handle this DATA based on it's type, which is unknown at that point. So I first DESCRIBE the field (its type). If for example this type results in a string, I want to move this string data from REF TO DATA into a local string value. Then I want to reformat the string value and save it again to the REF TO DATA field.
    So, in short, I have these tasks:
    1. determine type of REF TO DATA
    2a. if it's a string, then move the val. of the string into a local string variable
    2b. or alternatively do something else, if it's not a string value
    3. do something with the local string, then save it back to the REF TO DATA field
    Any ideas?
    Thank in advance for your help!
    Kind regards, Matthias

    Hi Matthias
    I think you missed a little and very important detail here:
      ASSIGN ls_rec-value TO <fs>.
    That's not what we want, instead you need to use:
      ASSIGN ls_rec-value->* TO <fs>.
    That's why you are obtaining this type 'l' which is refering to a TYPE REF TO DATA itself. Doing it the right way your final type would be 'C' which corresponds with a character data type.
    Best Regards

  • No G/L account found in Account determination type ZOFK

    Hi Forum,
    I have several inoices for which the acct. doc is not generated thru VFX3.
    In the header the Posting status shows "Posting document not created (pricing Error)"
    If I look in to the inovice's account determination analysis I find for two pricing condition types follwoing message is displayed *"No G/L account found in Account determination type ZOFK"*.
    Also in VKOA transaction there is no mention of ZOFK acct. det. condition type. It has all the G/L a/cs are assigned to ZOFI.
    Could some body help me how to know why in invoice the system is taking the ZOFK value and not posting it to account.
    Thanks.

    ZOFK is the copy of KOFK account determination type.................therefore whenever you are doing any costing related accounting entry system will required G/L account and Account Key combination for ZOFK account determination type...
    go to VKOA and maintain the G/L account with combination of Account key and Account determination type ZOFK...
    Regards,
    Ratish
    u2003

  • No G/L account found in Account determination type KOFI

    Hello everyone,
    I have an issue with a billing document, it will not release to accounting. I think I know what the issue is, however I have no idea how to fix it.
    When I go into the billing document, and I run an "Account Determination Analysis" for Revenue Accounts, I am getting the following error...
    "Access Message Description
    70 121 No G/L account found in Account determination type KOFI"
    And I am seeing the following details...
    Access (complete) Description
    Field in condition table Field in document Value in doc.
    Chart of accounts Chart of accounts KHAA
    Sales organization Sales organization 0001
    AcctAssgGr AcctAssgGr 01
    Acct assignment grp Acct assignment grp 01
    Valuation type Valuation type 1110170001
    Account key Account key ERL
    The account assignment group matches in the customer master as well as the material master.
    The Valuation Type above is set to "1110170001". This is NOT a valid valuation type, it is not setup in OMWC or anywhere else that I can find. This valuation type should be "EPAS". if it were, then the information is setup in VKOA, and we would not get this error.
    I was wondering if anyone has had this issue before? What can I do to get rid of this invalid valuation type?
    Thanks in advance for all your help.
    Rhonda

    Hi Rhonda
    Check what is the Valuation type of the  Material Master Record. Also check in OMWC for the plant what is the Account category reference. Also check in OMWD wheather for the Valuation area ,properly Valuation grouping code has been assigned or not. Finally check in VKOA wheather all G/L accounts are assigned or not and what is the G/L accounts that have been assigned
    Regards
    Srinath
    Edited by: sri nath on Oct 27, 2011 5:50 PM

  • How Can I Determine the Size of the 'My Documents' Folder for every user on a local machine using VBScript?

    Hello,
    I am at my wits end into this. Either I am doing it the wrong way or it is not possible.
    Let me explain. I need a vb script for the following scenario:
    1. The script is to run on multiple Windows 7 machines (32-Bit & 64-Bit alike).
    2. These are shared workstation i.e. different users login to these machines from time to time.
    3. The objective of this script is to traverse through each User Profile folder and get the size of the 'My Documents' folder within each User Profile folder. This information is to be written to a
    .CSV file located at C:\Temp directory on the machine.
    4. This script would be pushed to all workstations from SCCM. It would be configured to execute with
    System Rights
    I tried the script detailed at:
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/31/how-can-i-determine-the-size-of-the-my-documents-folder.aspx 
    Const MY_DOCUMENTS = &H5&
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(MY_DOCUMENTS)
    Set objFolderItem = objFolder.Self
    strPath = objFolderItem.Path
    Set objFolder = objFSO.GetFolder(strPath)
    Wscript.Echo objFolder.Size
    The Wscript.Echo objFolder.Size command in the script at the above mentioned link returned the value as
    '0' (zero) for the current logged on user. Although the actual size was like 30 MB or so.
    I then tried the script at:
    http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_27869829.html
    This script returns the correct value but only for the current logged-on user.
    Const blnShowErrors = False
    ' Set up filesystem object for usage
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    ' Display desired folder sizes
    Wscript.Echo "MyDocuments : " & FormatSize(FindFiles(objFSO.GetFolder(objShell.SpecialFolders("MyDocuments"))))
    ' Recursively tally the size of all files under a folder
    ' Protect against folders or files that are not accessible
    Function FindFiles(objFolder)
    On Error Resume Next
    ' List files
    For Each objFile In objFolder.Files
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:01", objFolder.Path
    On Error Resume Next
    FindFiles = FindFiles + objFile.Size
    If Err.Number <> 0 Then ShowError "FindFiles:02", objFile.Path
    Next
    If Err.Number = 0 Then
    ' Recursively drill down into subfolder
    For Each objSubFolder In objFolder.SubFolders
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:04", objFolder.Path
    FindFiles = FindFiles + FindFiles(objSubFolder)
    If Err.Number <> 0 Then ShowError "FindFiles:05", objSubFolder.Path
    Next
    Else
    ShowError "FindFiles:03", objFolder.Path
    End If
    End Function
    ' Function to format a number into typical size scales
    Function FormatSize(iSize)
    aLabel = Array("bytes", "KB", "MB", "GB", "TB")
    For i = 0 to 4
    If iSize > 1024 Then iSize = iSize / 1024 Else Exit For End If
    Next
    FormatSize = Round(iSize, 2) & " " & aLabel(i)
    End Function
    Sub ShowError(strLocation, strMessage)
    If blnShowErrors Then
    WScript.StdErr.WriteLine "==> ERROR at [" & strLocation & "]"
    WScript.StdErr.WriteLine " Number:[" & Err.Number & "], Source:[" & Err.Source & "], Desc:[" & Err.Description & "]"
    WScript.StdErr.WriteLine " " & strMessage
    Err.Clear
    End If
    End Sub
    The only part pending, is to achieve this for the 'My Documents' folder within each User Profile folder.
    Is this possible?
    Please help.

    Here are a bunch of scripts to get folder size under all circumstances.  Take your pick.
    https://gallery.technet.microsoft.com/scriptcenter/site/search?query=get%20folder%20size&f%5B0%5D.Value=get%20folder%20size&f%5B0%5D.Type=SearchText&ac=2
    ¯\_(ツ)_/¯

  • How can you determine the absolute path to a dynamically created NetStream object?

    We are trying to implement video captioning with a freeware component, ccforflash. This requires us to provide an absolute or relative path  to our NetStream object. How can we determine this path in Flash CS5 AS3?
    From the CCforFlashCS5 documentation:
    "2. Object name and path
    Type the name and path.  This is the instance name of the object with which CCforFlashAS3 will synchronize. It must be spelled correctly, since CCforFlashAS3 will query the object with this name for timing information in order to synchronize the captions. The path must also be included; either relative to the CCforFlashAS3 component (i.e. this.parent) or the absolute path from the main level of the movie (root)."

    It would be easier if the NetStream object was created on an easily identifiable place on the timeline. This player has an MVC architecture. The NetStream object is created in a subclass to Model class, which is itself a subclass of the EventDispatcher object. The View class access it via an interface.
    As you can guess, it's not that straightforward to determine where the NetStream object is located on the timeline. This is compounded by the fact that the NetStream object does not have a name property.
    I've tried methods like these, but they only work for the DisplayObject class:
    public static function displayObjectPath( avDisplayObject : DisplayObject ) :String
    var lvPath:String = "";
    do
    if( avDisplayObject.name ) {
    // var obj_name:String = (avDisplayObject.name == 'root1') ? 'root' : avDisplayObject.name;
    if (avDisplayObject.name != 'root1') {
    lvPath = avDisplayObject.name
       + ( lvPath == "" ? "" : "." + lvPath );
    } else {
    trace("displayObjectPath() NO NAME avDisplayObject="+avDisplayObject);
    } while( avDisplayObject = avDisplayObject.parent );
    return lvPath;
    } // displayObjectPath
    private  function showChildren(d:DisplayObjectContainer):void {
    trace("showChildren()");
    if (d.numChildren>0) {
    for (var c:Number = 0; c < d.numChildren; c++) {
    trace("showChildren c=",c," name=",d.getChildAt(c).name);

  • How to get patch type (Security, Recommended, Generic) from a script?

    All-
    If you run updatemanager on Solaris 10, it has a column for patch "Type", and includes Security, Recommended, Generic, etc.
    I would like to be able to have an automated process notify me whenever there are new patches released in either the Security or Recommended category. I've looked at using "smpatch analyze" to get a list of outstanding patches, but the patch list just includes the number and the synopsis, not what "Type" of patch it is. Even using
    smpatch download -t patchnum
    to fetch the README doesn't necessarily give you what Type of patch something is.
    Hence the question: how is updatemanager determining the type of patch? Are there other tools that can be used to figure out what type of patch something is?
    Thanks,
    Tim

    Take a look at pca--http://www.par.univie.ac.at/solaris/pca/

  • PR00 120 G/L account 0000785101 determined from Account determination type

    Hi all,
    I am getting the following error while saving sales order.
    PR00 120 G/L account 0000785101 determined from Account determination type
    I dont know why this error is occuring while creating sales order. Because of this issue, i am not able to save the sales order.
    How to solve this issue? Can anyone give me solution for this issue?
    Thanks in advance,
    Babu

    Hiii
    I hope you people are using COPA or Controlling in your process.
    This error is basically comes if you are not maintained the KOFK setting, same where u have done your KOFI setting, you have to do same with KOFK in Transaction VKOA.
    see what setting you have done for KOFI, copy that line and change KOFI to KOFK and save it.
    Hope it will solve your problem
    Regards
    Shambhu Sarkar

  • How do I determine what the default font for equations is?

    In the Equation Fonts dialog box, we can set the font of Functions, Numbers, Strings, and Variables.  In those dropdown lists, there is a Default (para) Font choice.  How do I determine what font that is?  What paragraph tag is associated with an equation?
    With all the choices set to default, numbers types in the equation look similar (but not exact) to the Symbol font, but of course typing letters in the Symbol font reveal greek characters.  So is it some derivation of Symbol?

    Thanks.  That .cfg file shows Times Regular for the following characters, but none of these characters are the regular alphabet, (are they?) so there must be yet another place?
    mathchar.cfg    53      < plus        2b Times Regular>
    mathchar.cfg    54      < equal       3d Times Regular>
    mathchar.cfg    70      < gg          c8 Times Regular>
    mathchar.cfg    71      < ll          c7 Times Regular>
    mathchar.cfg    93      < fact        21 Times Regular>
    mathchar.cfg    94      < dagger      a0 Times Regular>
    mathchar.cfg    98      < minus       d0 Times Regular>
    mathchar.cfg    106      < uequal      3d Times Regular>
    mathchar.cfg    112      < diff        64 Times Regular>
    mathchar.cfg    116      < ucomma      2c Times Regular>
    mathchar.cfg    117      < semicolon   3b Times Regular>
    mathchar.cfg    118      < optotal     64 Times Regular>
    mathchar.cfg    127      < power       5e Times Regular>
    I've determined (by comparing equation string to body string visually) that Times is in fact the font being used.  I just don't see yet how that gets determined.  Any further thoughts?

Maybe you are looking for