How to get all image files from a folder to wwv_flow_files?

Hi there!
Is it possible in apex to show, in a report look-a-like, all image filenames from a folder in another machine (i enter in that machine by ip) and insert all files into wwv_flow_files?
I want to see all files, then pick one and open a image...
But it can't be by browse item... it has to show all filenames as a list...
If it is possible, how can i do it?
Thanks!
Best regards,
Luis Pires

Hi,
you can connect to the server using UTL_HTTP.
Then for each files you copy the response into a BLOB to be able to show it or to store it in a table.
A piece of code :
begin
   -- initialize the BLOB.
   dbms_lob.createtemporary(l_blob, false);
   -- path to the file
   l_url := 'http://your_server/your_file.jpg';
   -- begin retrieving the target.
   l_req := utl_http.begin_request(l_url);
   -- identify ourselves (some sites serve special pages for particular browsers)
   utl_http.set_header(l_req, 'User-Agent', 'Mozilla/4.0');
   -- start receiving the response.
   l_resp := utl_http.get_response(l_req);
   -- copy the response into the BLOB.
   begin
      loop
         utl_http.read_raw(l_resp, l_raw, 32767);
         dbms_lob.writeappend (l_blob, utl_raw.length(l_raw), l_raw);
      end loop;
      -- stop when exception end_of_body is raised
   exception
      when utl_http.end_of_body then
         utl_http.end_response(l_resp);
   end;
end;It's a minimal example, you may need authentication, check l_resp.status_code, etc...

Similar Messages

  • How to Copy an Image File from a Folder to another Folder

    i face the problem of copying an image file from a folder to another folder by coding. i not really know which method to use so i need some reference about it. hope to get reply soon, thx :)

    Try this code. Make an object of this class and call
    copyTo method.
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class FileUtil
    extends File {
    public FileUtil(String pathname) throws
    NullPointerException {
    super(pathname);
    public void copyTo(File dest) throws Exception {
    File parent = dest.getParentFile();
    parent.mkdirs();
    FileInputStream in = new FileInputStream(this); //
    Open the source file
    FileOutputStream out = new FileOutputStream(dest); //
    Open the destination file
    byte[] buffer = new byte[4096]; // Create an input
    buffer
    int bytes_read;
    while ( (bytes_read = in.read(buffer)) != -1) { //
    Keep reading until the end
    out.write(buffer, 0, bytes_read);
    in.close(); // Close the file
    out.close(); // Close the file
    This is poor object-oriented design. Use derivation only when you have to override methods -- this is just
    a static utility method hiding here.

  • How to get latest added file from a folder using apple script

    Hi..
    I am trying to get a latest added file from a folder..and for this i have below script
    tell application "Finder"
        set latestFile to item 1 of (sort (get files of (path to downloads folder)) by creation date) as alias
        set fileName to latestFile's name
    end tell
    By using this i am not able to get latest file because for some files the creation date is some older date so is there any way to get latest file based on "Date Added" column of a folder.

    If you don't mind using GUI Scripting (you must enable access for assistive devices in the Accessibility System Preference pane), the following script should give you a reference to the last item added to any folder. Admittedly not the most elegant solution, but it works, at least under OS X 10.8.2.
    set theFolder to choose folder
    tell application "Finder"
        activate
        set theFolderWindow to container window of theFolder
        set alreadyOpen to exists theFolderWindow
        tell theFolderWindow
            open
            set theInitialView to current view
            set current view to icon view
        end tell
    end tell
    tell application "System Events" to tell process "Finder"
        -- Arrange by None:
        set theInitialArrangement to name of menu item 1 of menu 1 of menu item "Arrange By" of menu 1 of menu bar item "View" of menu bar 1 whose value of attribute "AXMenuItemMarkChar" is "✓"
        keystroke "0" using {control down, command down}
        -- Sort by Date Added:
        set theInitialSortingOrder to name of menu item 1 of menu 1 of menu item "Sort By" of menu 1 of menu bar item "View" of menu bar 1 whose value of attribute "AXMenuItemMarkChar" is "✓"
        keystroke "4" using {control down, option down, command down}
        -- Get the name of the last item:
        set theItemName to name of image 1 of UI element 1 of last scroll area of splitter group 1 of (window 1 whose subrole is "AXStandardWindow")
        -- Restore the initial settings:
        click menu item theInitialSortingOrder of menu 1 of menu item "Sort By" of menu 1 of menu bar item "View" of menu bar 1
        click menu item theInitialArrangement of menu 1 of menu item "Arrange By" of menu 1 of menu bar item "View" of menu bar 1
    end tell
    tell application "Finder"
        set current view of theFolderWindow to theInitialView -- restore the initial view
        if not alreadyOpen then close theFolderWindow
        set theLastItem to item theItemName of theFolder
    end tell
    theLastItem
    Message was edited by: Pierre L.

  • How to get all images in indesign CS5 with javascript?

    Hi,everybody,
    How to get all images in indesign CS5 with javascript?I want to delete them.
    Anyone can give me some example codes?
    Thanks,
    Bridge

    Hey!
    This will remove all images from your InDesign document:
    var myLinks = app.activeDocument.links.everyItem().parent;
    for(var i = 0; i < myLinks.length; i++)
        myLinks[i].remove();
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • How to get all the values from the dropdown menu

    How to get all the values from the dropdown menu
    I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
    How do I get number of item is selection dropdown?
    How do I extract a ?name? for each value, one by one?
    How do I change a selection by referring to particular index of the item in a dropdown menu?
    Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
    RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
    Message was edited by: testtest

    The findElement method allows various attributes to be used to search. Take the following two examples for the element below:
    <Select Name=ProdType ID=testProd>
    </Select>
    I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
    Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
    If I want to search by id I could do the following:
    Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
    Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
    You can use the FindElement to grab links, text boxes, etc.
    The next example grabs from a link on a page
    Home
    Set x = RSWApp.om.FindElement("Home","A","innerText")
    I hope this helps clear it up.

  • How use PHP to read image files from a folder and display them in Flex 3 tilelist.

    Hello. I need help on displaying images from a folder dynamically using PHP and display it on FLEX 3 TileList. Im currently able to read the image files from the folder but i don't know how to display them in the TileList. This is my current code
    PHP :
    PHP Code:
    <?php
    //Open images directory
    $imglist = '';
    $dir = dir("C:\Documents and Settings\april09mpsip\My Documents\Flex Builder 3\PHPTEST\src\Assets\images");
    //List files in images directory
    while (($file = $dir->read()) !== false)
    if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
    echo "filename: " . $file . "\n";
    $dir->close();
    ?>
    FLEX 3 :
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="pic.send();">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.FaultEvent;
    import mx.events.ItemClickEvent;
    import mx.rpc.events.ResultEvent;
    public var image:Object;
    private function resultHandler(event:ResultEvent):void
    image = (event.result);
    ta1.text = String(event.result);
    private function faultHandler(event:FaultEvent):void
    ta1.text = "Fault Response from HTTPService call:\n ";
    ]]>
    </mx:Script>
    <mx:TileList x="31" y="22" initialize="init();" dataProvider = "{image}" width="630" height="149"/>
    <mx:String id="phpPicture">http://localhost/php/Picture.php</mx:String>
    <mx:HTTPService id="pic" url="{phpPicture}" method="POST"
    result="{resultHandler(event)}" fault="{faultHandler(event)}"/>
    <mx:TextArea x="136" y="325" width="182" height="221" id="ta1" editable="false"/>
    <mx:Label x="136" y="297" text="List of files in the folder" width="182" height="20" fontWeight="bold" fontSize="13"/>
    </mx:Application>
    Thanks. Need help as soon as possbile. URGENT.

    i have made some changes, in the php part too, and following is the resulting code( i tried it, and found that it works.):
    PHP Code:
    <?php
    echo '<?xml version="1.0" encoding="utf-8"?>';
    ?>
    <root>
    <images>
    <?php
    //Open images directory
    $dir = dir("images");
    //List files in images directory
    while (($file = $dir->read()) !== false)
    if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
    echo "<image>" . $file . "</image>"; // i expect you to use the relative path in $dir, not C:\..........
    //$dir->close();
    ?>
    </images>
    </root>
    Flex Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="callPHP();">
    <mx:Script>
    <![CDATA[
    import mx.rpc.http.HTTPService;
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.FaultEvent;
    import mx.events.ItemClickEvent;
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var arr:ArrayCollection = new ArrayCollection();
    private function callPHP():void
    var hs:HTTPService = new HTTPService();
    hs.url = 'Picture.php';
    hs.addEventListener( ResultEvent.RESULT, resultHandler );
    hs.addEventListener( FaultEvent.FAULT, faultHandler )
    hs.send();
    private function resultHandler( event:ResultEvent ):void
    arr = event.result.root.images.image as ArrayCollection;
    private function faultHandler( event:FaultEvent ):void
    Alert.show( "Fault Response from HTTPService call:\n " );
    ]]>
    </mx:Script>
    <mx:TileList id="tilelist"
    dataProvider="{arr}">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Image source="images/{data}" />
    </mx:Component>
    </mx:itemRenderer>
    </mx:TileList>
    </mx:Application>

  • Importing All the files from a folder at a time

    Hi....
    Can any body tell me how to import set of files from a folder into IDM.
    It is becoming very difficult to import the files one after other....
    Waiting for Reply....
    Thanks in advance..........

    We used an ant script to build an XML file that will contain the files. The script is configured to use the folder structure of our CVS repository.
    We'd checkout our XML module and then run the build script and import the resulting init file.
    Code to the script is below -- caveat emptor. You'll need to change the folder structure to suit your own environment.
    <?xml version="1.0" encoding="UTF-8"?>
    <project basedir="." default="all" name="MyInit">
        <target name="init">
            <property location="." name="src.dir"/>
            <property location="." name="dest.dir"/>       
            <property name="project.name" value="${ant.project.name}"/>
            <property location="${dest.dir}/MyInit.xml" name="MyInit.output"/>
            <property name="source.configuration" value="${dest.dir}/configuration"/>       
            <property name="source.emailTemplate" value="${dest.dir}/emailTemplate"/>
            <property name="source.forms" value="${dest.dir}/forms"/>
            <property name="source.reports" value="${dest.dir}/reports"/>               
            <property name="source.resource" value="${dest.dir}/resource"/>          
            <property name="source.rules" value="${dest.dir}/rules"/>
            <property name="source.workflow" value="${dest.dir}/workflow"/>
            <!-- get the source path -->
            <path id="configuration.path">
                <fileset dir="${source.configuration}" >
                   <include name="*.xml" />
                </fileset>
             </path>
             <property name="cp" refid="configuration.path" />
             <path id="emailTemplate.path">
                <fileset dir="${source.emailTemplate}" >
                   <include name="*.xml" />
                </fileset>
             </path>
             <property name="ep" refid="emailTemplate.path" />
             <path id="forms.path">
                <fileset dir="${source.forms}" >
                   <include name="*.xml" />
                </fileset>
             </path>
             <property name="fp" refid="forms.path" />
            <path id="reports.path">
                <fileset dir="${source.reports}" >
                   <include name="*.xml" />
                </fileset>
             </path>
             <property name="rptp" refid="reports.path" />                 
            <path id="resource.path">
                <fileset dir="${source.resource}" >
                   <include name="*.xml" />
                </fileset>
             </path>
             <property name="rep" refid="resource.path" />        
            <path id="rules.path">
                <fileset dir="${source.rules}" >
                   <include name="*.xml" />
                </fileset>
             </path>
             <property name="rp" refid="rules.path" />
            <path id="workflow.path">
                <fileset dir="${source.workflow}" >
                   <include name="*.xml" />
                </fileset>
             </path>
             <property name="wp" refid="workflow.path" />
            <!-- get the path prefix -->
             <path id="source.path">
                <pathelement location="${src.dir}" />
             </path>
             <property name="sp" refid="source.path" />       
        </target>
        <target depends="init"  name="win_init">
            <!-- change the path of xml files to windows path -->
            <property name="importfile.path" value="${sp}"/>                            
        </target>              
        <target depends="init" name="make">
        <!-- using XML character entity references to escape
        <  <
        >  >
        '  &apos;      -->    
            <echo file="${MyInit.output}" append="false"><?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <Waveset>
    ${cp}
    ${ep}
    ${fp}
    ${rptp}
    ${rp}
    ${wp}
    </Waveset>
            </echo>
         <!-- replace path prefix with ImportCommand -->
         <replace file="${MyInit.output}"
                  token = "${sp}"
                  value = "<ImportCommand name='include' file='${importfile.path}" />
         <!-- deal with file and path separators in an os independent way -->
         <replace file="${MyInit.output}"
                  token = "${file.separator}"
                  value = "/" />        
        <replace file="${MyInit.output}"
                  token = "${path.separator}"
                  value = "${line.separator}" />
        <replace file="${MyInit.output}"
                  token = ".xml"
                  value = ".xml'/>" />
        </target>
        <target depends="init,win_init,clean,make" description="Build everything." name="all"/>
        <target depends="init" description="Clean all build products." name="clean">
            <delete file="${MyInit.output}"/>
        </target>
    </project>

  • How can I bring a file from a folder on my desktop to this program and make it editable. Like deleti

    How can I bring a file from a folder on my desk top int this program and make it editable., in order to replace words or remove words or texts..?  jn

    Hi,
    FormsCentral cannot be used to edit existing PDF documents. That functionality is available in Adobe Acrobat:
    http://www.adobe.com/products/acrobat.html
    Regards,
    Brian

  • How to get all images from folder in c#?

    I am trying to get all images from folder. But it is not executing from following:
     string path=@"C:\wamp\www\fileupload\user_data";
                string[] filePaths = Directory.GetFiles(path,".jpg");
                for (int i = 0; i < filePaths.Length; i++)
                    dataGridImage.Controls.Add(filePaths[i]);
    Please give me the correct solution.

    How to display all images from folder in picturebox in c#?
    private void Form1_Load(object sender, EventArgs e)
    string[] files = Directory.GetFiles(Form1.programdir + "\\card_images", "*", SearchOption.TopDirectoryOnly);
    foreach (var filename in files)
    Bitmap bmp = null;
    try
    bmp = new Bitmap(filename);
    catch (Exception e)
    // remove this if you don't want to see the exception message
    MessageBox.Show(e.Message);
    continue;
    var card = new PictureBox();
    card.BackgroundImage = bmp;
    card.Padding = new Padding(0);
    card.BackgroundImageLayout = ImageLayout.Stretch;
    card.MouseDown += new MouseEventHandler(card_click);
    card.Size = new Size((int)(this.ClientSize.Width / 2) - 15, images.Height);
    images.Controls.Add(card);
    Free .NET Barcode Generator & Scanner supporting over 40 kinds of 1D & 2D symbologies.

  • How to sinc two computers and get all the files from both

    Not sure if this is the right forum for the issue, but... I have a iMac G5 and a MacBook, and I use one or the other for my work. That way I get part of my work on one, and other part on the other Mac. Now, I would like to sinc both of them, so that I have all the files from iMac on the MB, vice versa. I know that I could go slowly and use an external hard drive, copy files from one computer, save on another, but is there any handier and faster way to do it?
    Thanks
    Zo

    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh664.html
    http://docs.info.apple.com/article.html?artnum=106461

  • Aperture installation deleted all image files from MacBook Pro.

    After installing Aperture 3, I noticed that all the image files I had on my MacBook Pro immediately disappeared. These were stored in various locations throughout my computer depending on subject (e.g. "Emergency Response Training", "Summer 2009", "Car Restoration" and so on). A small number were in the "Pictures" folder but most were kept in other locations. All the folders and subfolders where these images were stored are intact but the images are gone. There is simply a "thumbs.db" file inside and the folder size is about 6 kb on average.
    I did nothing other than install Aperture (no importing or library creation) and none of these images or folders are in the Aperture library. A similar thing happened with iPhoto where all my iphoto thumbnails show up but there appears to be no actual photo. No images prior to Aperture installation appear anywhere on the Macbook using tailored queries with "Find". 
    Apple support indicated that Aperture would not search out these photos unless prompted and would never delete them but It's hard to imagine how else this could have happened, as it happened only during installation (subsequent photos are fine) and targeted all image files in every location. Hard drive is new and indicates no problems.
    Any ideas what might have happened - and, more importantly, how I might be able to recover the missing images? Unfortunately, my upgrade to Lion obliterated my DNS 321 back up disk, as well, and I don't yet know if I can recover those files.
    Thanks for any help you can offer.

    Apple support claimed it was impossible for Aperture to delete files, as well, Allen. All I can tell you is I installed Aperture and the files immediately disappeared. I installed Aperture with the intention of learning its capabilities over the ensuing months, as I had never used it before, and so made sure to do nothing but install and launch so I could have a look at it and see how it was set up.
    The network hard drive obliteration occured when I was trying to transfer novie files from my Macbook to my DNS 321 network drive, which I use to store all my backups and most of my media files. I've done this countless times with Snow Leopard without a hitch. However, when I tried it with Lion the system locked up during the transfer and I lost my connection to the drive. Once I managed to reconnect, I found that I couldn't get into the folders on the network drive anymore. All that would come up was a "My Documents" folder, which had no content. After doing a websearch I discovered that Lion no longer supports DNS 321 and that others with similar style drives had been having similar problems. What might be unique to my situation was that when I hooked up an old PC to the DNS 321 I was able to get back into my original folder set up but I found that the folders labelled from (A to J) were missing entirely and that the remaining folders had no content.
    So, as I mentioned in my first post, the only input from me was installation and launch of Aperture and the only thing I was doing with my network drive was transferring movie files from the Macbook to the DNS 321 drive. If neither of those actions could possibly have caused the problems I described, I'd be very eager to learn what did.

  • Get all html files from a url

    Hi I am trying to do a website copyer and i don't know how get all the html from a url.
    By example:
    I want get all files html from http://forum.java.com/
    aAnybody has an idea of how to do this?
    Thanks

    Not easy. First, you'll have to look at networking programming - how to make URL connections etc.. Then, you'll have to look at HTML parsers - how to extract links, images, etc. from an HTML page. Also, you'll have to know how to do file I/O in order to save the HTML files obtained.
    I don't know of any Java-based web site copier open source projects that you can refer to, but you can take a look at the source code for projects such as HttpUnit and HtmlUnit. They contain code that'll help you with your web site copier.
    Good luck!

  • How to delete all my files from my Mac?

    Can anyone help me, how do I delete all my files from my Mac?

    If you want to eventually sell or give away your Mac, follow the below steps to prepare it.
    If your old Mac shipped with Lion or Mountain Lion, boot into Internet Recovery by holding down Cmd-opt-r on restart. When it boots, select Disk Utility and erase the Macintosh HD volume, then reinstall the OS. It will install the OS the Mac shipped with.
    If it shipped with Snow Leopard, boot from the original install disk and select Disk Utility from the Utilities menu which you will see after selecting the Language. From there, select the Hard drive device (top of the list), and click on the Partition tab. Set it to 1-partition, give the new volume a name (Macintosh HD), and click Apply.
    If you just want to get rid of the data off the Mac, create a new Admin user account, log into it, then delete your user account from the Users &amp; Groups system Prefs. It will ask if you want to keep or delete the home folder.

  • How to make a image file from Pre installed Mac osx ? "PLEASE HELP :("?

    hey guys ..Thanks u for the time.
    So i have this eMac which has crashed and i have got may hands on another eMac.. and it works
    ... the only problem is.. I can take my eMac to the working eMac to do Target Mode or any thing...
    So Help me..
    My question is .. Is there a way to make a .DMG image file from pre installed mac osx OR
    Is there a way to may a recovery disc??

    You can use Carbon Copy Cloner to copy everything from the working eMac onto the non-working eMac while the working eMac is running. If your eMac will still do target mode into the working one, you can download the above software, select the booted drive as the source drive, and your eMac's drive as the target, however it is possible this will not work.
    When you say your eMac crashed, what exactly happened?  It is possible that the hard drive in your eMac failed or is failing, so in order to get it running again you would need to replace the hard drive.  On the eMac, this repair is somewhat involved, and you have to be very careful because it exposes the CRT, which has several areas which can be extremely dangerous to touch if not properly handled.  CRTs retain a great deal of voltage, even when unplugged, sometimes for weeks, and they can give you a nasty shock if you touch them in the wrong place.
    Also keep in mind that cloning from the working computer to the non-working computer will ERASE any data that you have stored on that eMac, so if you don't have it backed up anywhere, you may want to attempt that with target mode before proceeding.
    Good luck!

  • How we can get all the files in FTP folder

    Hi all,
    My requirement is need to retrive text files from FTP folder to application server.
    For this i am using FTP_SCRAMBLE
                                FTP_CONNECT
                                FTP_COMMAND function modules.But i dont know how we can access particular folders and all files in Particular folders.For this i dont know the process and is there any commands to see all files in a folder.
    Very Urgent...
    Thanks and Regards,
    Siva.

    Hi,
    Check the link below:
    Re: How can we upload a file from ftp server
    hope this helps.
    regards,
    Sharath

Maybe you are looking for