How can I store .jpeg files in Oracle ?

Hello All,
I'd like to store .jpeg picture images in my database having 2 columns - model_no and model_pic1.
I know that I've got to use LONG RAW datatype for binary large objects... Don't know anything more...
Would be pleased if anyone help me in doing this.
Thanking you,
Plascio

For PDFs, it's better to use Dropbox instead of icloud.
If you want to use icloud, you'd have to use itunes's app tab and drag the pdf file to the right panel after highlighting iBooks.  A pain. 
For Dropbox: On the iOS device, use GoodReader to access the file(s).
If you are just trying to store a pdf on icloud as storage, than getting the pdf to icloud and then back to your mac involves drag and drop both ways using itunes.  Again, use Dropbox instead.

Similar Messages

  • How can i store jpeg file in iCloud?

    I want to upload jpeg file in iCloud, so that I could insert it to my document later with Pages. but can't find how can i store this type of file in icloud....

    iCloud isn't really meant for that purpose, more for syncing across devices. Try something like dropbox.

  • How can I store iPhoto files on an external hard drive rather than on the iMac drive

    How can I store my iPhoto library on an external hard drive rather than the iMac drive to make my computer faster?

    Make sure the drive is formatted Mac OS Extended (Journaled)
    1. Quit iPhoto
    2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
    3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
    4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
    Regards
    TD

  • How can we store .jpeg or .gif images in ms-access table

    hai to all iam new to core java
    Dear all,
    I am having a JFileChooser in which i select a image file now i want to store that particular jpeg file in MS-Access, I try it using memo type in ms-access
    please help me
    thanks

    Well, so, what happens? And did you consider BLOBs?

  • How can I repair jpeg files that seem to be damaged in my iPad?

    Hello everyone. I have an iPad 1 where I put some pictures using a PC and that were not sync by iTunes. Hope that makes sense, I did't use the iTunes rather just drop the folder with the pics in the iPad using a PC (like pretty much an external drive), I was able to see the pictures in my iPad without problems, even as I created the albums. Then my laptop was stolen and I lost all the original files. I want to recover those pictures but when I connect the iPad to my iMac it doesn't recognize the files by iTunes or iPhoto (only the ones that are in the camera roll, those saved from emails on the iPad)
    I downloaded two different programs to try to import the pictures to my iMac and I can see the files but then I realized that those files are empty. The thumbnails show the images kindy of blurry but when I copy the files and try to open them it says is empty. In the iPad the pictures now appeared to be also blurry, this did not happened before, I saw the pictures last week and were perfect, I'm assuming that in the process of trying to find a program to extract the pictures the files were damaged somehow.
    Please tell me there's a way I can repair those files! I have around 3000 pictures that otherwise are lost forever.
    Thanks in advance!

    Thanks for your reply. The pictures are blurry on the iPad too, if I try to email them from there the email shows the attached file as a question mark (?). I already try to take out the files with a PC without iTunes and I can't see the files there either. I only found the files with those two programs but the also appeared as empty files.
    The question is if I can repair those files. Thanks a million.

  • How  can i Store a file using in a servlet?

    This is because i have a Applet<->Servlet comunication.....
    With the following application i can store a image in a file in the directory that i indicate.....
    class rec_image
    public static void main(String h[]) {
    Connection con = null;
    Clob cl;
    JPanel photo;
    FileOutputStream file = null;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    con= DriverManager.getConnection("jdbc:oracle:thin:@112.21.2.233:1521:db_name","user","password");
    con.setAutoCommit(false);
    String query = "Select Pict from Pictures where ID_Pict = '180'";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery( query );
    if ( rs.next() ) {
    //Get the GIF
    byte[] bytes = rs.getBytes(1);
    file = null;
    file = new FileOutputStream ("leslie.gif");
    file.write(bytes);
    if (file != null)
    file.close();
    } catch (IOException e) {
    String err = e.toString();
    System.out.println(err);
    } catch (Exception e) {
    String err = e.toString();
    System.out.println(err);
    } finally {
    //if (file != null)
    Now...i need to do the same...but....using a servlet that is called by a applet....but this is not functioning :( ,ie, no file is stored in the directory that i indicate....
    The servlet would recive the query from the applet and the servlet would store the image file in the directory that i indicate....but it is not working correctly...something is wrong.......
    I not obtain any exception ...is like the servlet wasn't executed.....
    I think it...because i dont obtain the System.out.println coments (that i put in the servlet code) in the console and any file is stored :(.....
    Somebody could help me please?
    This is a snnipet of applet code.....
    class store_pict extend JApplet {
    //Some intructions
    private void Store_Picture() {
    try {
    servletURL_bytes = new URL("http://112.21.2.233/servlet/coreservlets.obt_bytes");
    } catch(MalformedURLException e) {
    System.out.println("1er. Error en el m�todo Init() en la construcci�n de la URL");
    System.out.println(e);
    } catch(Exception e) {
    System.out.println("2do. Error en el m�todo Init() en la construcci�n de la URL");
    System.out.println(e);
    String query = "Select Pict from Pictures where ID_Pict = '180'";
    make_servlet_connection_bytes(query);
    private void make_servlet_connection_bytes(String query) {
    System.out.println("Start applet-servlet to store picture");
    ObjectOutputStream outToServlet = null;
    byte [] query_Array_bytes = null;
    try {    
    //Setup servlet connection
    URLConnection servletConnection = servletURL_bytes.openConnection();
    servletConnection.setDoInput(true);
    servletConnection.setDoOutput(true); // to allow us to write to the URL
    servletConnection.setUseCaches(false); // to ensure that we do contact
    servletConnection.setDefaultUseCaches(false);
    //Send output to servlet
    servletConnection.setRequestProperty("Content-Type", "application/octet-stream");
    outToServlet = new ObjectOutputStream(servletConnection.getOutputStream());
    outToServlet.writeObject(query);
    outToServlet.flush();
    outToServlet.close();
    } catch (Exception e){
    System.out.println("Error en el m�todo make_servlet_connection()");
    e.printStackTrace();
    System.out.println("End applet-servlet to store picture");
    This is my servlet code:
    package coreservlets;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class obt_bytes extends HttpServlet {
    Connection con = null;
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    //aren't sending a get
    public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    System.out.println("Start Servlet");
    ObjectInputStream inFromApplet = null;
    ObjectOutputStream outToApplet = null;
    String inString = null;
    FileOutputStream file = null;
    try {
    System.out.println("Start Servlet");
         //Read string from applet
         inFromApplet = new ObjectInputStream(req.getInputStream());
         inString = (String) inFromApplet.readObject();
         inFromApplet.close();
    System.out.println("Read string from applet = " + inString);
    String query = inString;
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    con= DriverManager.getConnection("jdbc:oracle:thin:@112.21.2.233:1521:db_name","user","password");
    con.setAutoCommit(false);
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery( query );
    //Get the GIF
    byte[] bytes = rs.getBytes(1);
    file = null;
    file = new FileOutputStream ("C:/jakarta-tomcat-4.0.3/webapps/ROOT/images/leslie111.gif");
    file.write(bytes);
    if ( file != null )
    file.close();
    } catch(Exception e) {
    System.out.println("Not Stored File");
    e.printStackTrace();
    System.out.println("End Servlet");
    Please help me.....
    Thanks in advance ...
    Mary

    Greetings,
    //Setup servlet connection
    URLConnection servletConnection = servletURL_bytes.openConnection();
    ...Here's the first problem: your servlet is an HttpServlet but your applet is treating it as though it is a GenericServlet. The above should correctly be:
    HttpURLConnection servletConnection = (HttpURLConnection) servletURL_bytes.openConnection();Note: using a "generic" URLConnection will, of course, "work". However, by instead using an HttpURLConnection (to communicate with an HTTP resource), your applet will also gain significant ease in working with the HTTP protocol - parsing server responses (remember, servlets run as extensions, not replacements, of their hosting servers), for example - as in any one of, currently (http://www.w3.org/Protocols/rfc2616/rfc2616.html), 40 possible status codes... - not to mention...
    servletConnection.setDoInput(true);
    servletConnection.setDoOutput(true); // to allow us to write to the URL
    servletConnection.setUseCaches(false); // to ensure that we do contactHere's a subsequent problem: your servlet is expecting the data to arrive by way of... er... "POST" (no pun intended ;). However, the default 'HTTP request method' is "GET". So here should also be:
    servletConnection.setRequestMethod( "POST" );However, it should be noted that in the case of "POST"-ing file data, it must be sent as a multipart message and this can be a literal "pain in the neck" to manage. Therefore, it is far better to HTTP "PUT" the file to the server - which can easily be done as is coded in your applet - though your servlet must, in turn, be refactored to respond to such a request. Of course, all of this "PUT"-ing and "POST"-ing can be dispensed with entirely by simply refactoring your servlet to be a GenericServlet, though you will also have to devise your own protocol for communicating (e.g. success or failure) between the tiers...
    Please help me.....I hope this helps.
    Thanks in advance ...
    MaryRegards,
    Tony "Vee Schade" Cook

  • How can I store a File object into a Vector and get it back

    hi there
    I need to store a number of File object into a Vector first, and later on I need to get each File object out and work with it.
    Vector mylist;
    File[] myfile;
    ....get a list of files from using File Chooser
    mylist = new Vetor();
    for (i=0;i<myfile.length;i++){
    mylist.add(myfile);
    ..how do I get them back? i try to do this way
    for (i=0;i<mylist.size(); i++)
    File tempfile = mylist.get(i);
    ..work with tempfile. but I got java.lang.object error: imcompatible types. what can I do?

    Vector mylist;
    File[] myfile;
    ....get a list of files from using File Chooser
    mylist = new Vetor();
    for (i=0;i<myfile.length;i++){
    mylist.add(myfile);
    ok try this: i don't reall understand what your trying to do though...
    File[] files;
    // get files
    Vector fileList = new Vector();
    for (int i = 0; i < files.length; i++)
      fileList.add(files);
    // to get them out.
    for (int i = 0; i < fileList.size(); i++)
    ((File)fileList.elementAt(i)).toString();
    // or
    // to get them out.
    for (int i = 0; i < fileList.size(); i++)
    File temp = (File)fileList.elementAt(i);
    System.out.println(temp.toString);

  • How Can I Store a function in Oracle Lite ?

    Hi,
    I have a pl/sql function that I want to store into polite database, Is this possible ?
    Thanks in advance.

    Not possible. You can only do java stored procedures and INSTEAD OF triggers.

  • How can I store my music files on an external hard drive and listen to them through iTunes that way?

    How can I store my music files on an external hard drive and listen to them through iTunes that way? At the moment they're both on the external hard drive and also stored on the computer but I'm quickly running out of memory on my iBook G4 so I'd like to only keep them on the external hard drive and, if possible, delete them from my computer's hard drive. At the moment, when the hard drive isn't plugged in a lot of the files won't play and I get the exclamation mark next to the particular song in iTunes, but everything plays fine when the hard drive is plugged in.
    Thank you.

    Sounds like your files are playing from the external drive already.  To check go to iTunes - Preferences - Advanced and check the Media Folder Location.  Change it to the external drive if you need to.

  • HT4847 How can I store files on iCloud?

    How can I store files on iCloud?

    Actually, I have found that this is very possible, combining several other tips from around the web, though perhaps not easy.  I am using Moutain Lion.  I am assuming that you have already activated and signed into iCloud previously.  Here are the steps for creating a cloud storage location that you can drage any file into, and access from any of your Macs:
    1) Create a new folder in the directory that is synced with iCloud.  Start by opening a Finder window, and going to the ~/Library/ directory.  Do this by typing Shift-Command-G while the Finder is open, and typing ~/Library in the goto window.  Next, open the directory "Mobile Documents".  Finally, Control-Click inside the Finder and select the "New Folder" option, naming it whatever you like -- I chose "iCloud".
    2) Step two is about creating a shortcut to this iCloud folder in the Finder.  You cannot directly drag the iCloud folder into the Favorites section of the Finder, but you can do this:  Control-Click on your new folder, and select "Make Alias".  Now, drag this alias over to your Favories panel in the finder.  You will be prompted whether you really want to move the Alias out of iCloud: Say "Yes".  Now, delete the Alias -- you don't need the original instance of it any more. (Alternatively, you can skip to the end of step 3 and drag the symbolic link into the Finder Favorites)
    3) Step three is about being able to access this iCloud folder from the Unix command line, and from the Desktop GUI.  Open a Terminal window (Launchpad => Other => Terminal).  By the way, I recommend putting the Terminal into your Taskbar, if it isn't already.  You should be in your home directory ... to verify, type "cd" and press Enter.  Now, create a Unix symbolic link (an Alias won't work for this) to the actual location of the iCloud folder:
    Type "ln -s ~/Library/Mobile\ Documents/iCloud/ iCloud" and press enter.  The command should be entered precisely, I recommend cut and paste.  The first character is a lower case "L" and there is a space after the backslash between "Mobile" and "Documents".  You should now have a symbolic link to the iCloud folder created.  To view it in the Finder, go to your home directory: Shift-Command-G, and then enter "~/" into the window.  You should see a folder called "iCloud" there, with a little arrow animation in the corner.  You can drag this into the Taskbar to have a permanent clickable shortcut.  You can also access the contents of this folder through the terminal.  From your home directory, just type "cd iCloud" and press Enter.  You are now in the iCloud folder (or more properly, your local version of it), and can use the usual Unix tricks ... "ls" to list contents, "mkdir ABCD" to make a new directory called "ABCD", "mv a.txt b.txt" to rename a file "a.txt" into "b.txt", etc.
    4) Step four is about accessing this folder on other machines.  On a second Mac, repeat all of the steps above *EXCEPT* for creating the New Folder in step 1 ... it already exists, but you can get it into your finder bar, and create sym-links in the same way from there.
    The great thing about this is that when you work, you are editing a *local* copy of the file, so you can work offline if you like.  Then, whenever you have internet access, the *actual remote* cloud copy of any new or modified files is uploaded.  Likewise, updated files are downloaded from the cloud to get your local files into sync.  You have the benefit/safety of a local hard copy, AND the portability (and extra safety) of cloud storage.  It's exactly what I wanted, and it works like a dream.  Plus, time machine can back up your *local* copies, to maintain version history.  I'm not quite sure what happens if you try to simultaneously edit a file from two places, but don't do that.
    Hope that helps you!
    JWSpaceman

  • HT4847 how can i store ms office files in iCloud?

    how can i store ms office files in iCloud?

    Welcome to the Apple Support Communities
    To store Office files on iCloud, you need Numbers, Keynote or Pages, depending of the files you want to upload (Word, PowerPoint or Excel).
    First, if you haven't done it, open App Store and purchase Keynote, Numbers and/or Pages. Then, if you have OS X Mountain Lion, when you open the app, you will see an iCloud window where you can drag your Office documents to be uploaded to iCloud.
    If you don't have OS X Mountain Lion, open http://www.icloud.com, login with your Apple ID, select iWork and drag your Office documents

  • How can i store files from a PC on time capsule

    How can i store files from a PC on Time Capsule

    Actually although the format on the TC is not NTFS but Mac HFS+, that is irrelevant as far as windows is concerned. The TC offers SMB protocol to the network.. so how the TC stores the files is totally irrelevant.
    1. TC is by nature not particularly SMB happy..
    Change all names, TC and wireless to SMB compatible. Short, no spaces, pure alphanumeric.
    Turn on the guest account to read write access.. assuming you don't have security issues.
    Set the workgroup correctly.. don't use wins server.. no body does nowadays.
    Note short no space names.. guest access and workgroup all set.
    2. Download and install airport utility for windows or just bonjour for windows.. bonjour should be included with the full uitlity but that is not necessary.
    3. Just doing the above when bonjour loads it should bring up TC as accessible.. if not, or you need to access it manually.. open windows explorer and type in the address bar.
    \\TCName or \\TCIPaddress .. obviously replacing the generic name with the actual one used. In my case. as per the above screen shot. \\TCGen3
    You will then see the main root directory of the TC.. data or whatever it is named..
    Create a new directory under the root directory for your windows files.. and copy them there.
    Note .. some issues can arise if you are using the TC for TM backups.. Please keep a large enough amount of free space available that TM still works.. pondini recommends using disk images.
    http://pondini.org/TM/TCQ3.html
    As long as you still have plenty of free space this is not an issue but TM may have issues when it fills the drive as it is designed to do.

  • How can i Store rtmp streaming into local File System?

    I use socket and netstream.appendBytes to receive and play flv frames.
    now I got the BytesArray,but how can i store them into local File?
    FlashPlayer can't use Air File APIs.

    This is by design.  Content on the Internet does not have access to your local filesystem.  We offer Local Shared Objects (LSOs) for storing small amounts of information, but this would not be suitable for scraping a video feed to disk.

  • Store PDF File in Oracle database 10g

    Hi all,
    I want to store PDF File in Oracle database 10g,
    and then I want to access the pdf file using Oracle Developer 6i
    can anyone tell me how to do this,
    thanks in advance.

    This question has already been posted a lot of times.....
    See the following:
    http://forums.oracle.com/forums/search.jspa?threadID=&q=pdf+file&objID=f82&dateRange=lastyear&userID=&numResults=15
    Greetings,
    Sim

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

Maybe you are looking for