Upload and Copy files using PLSQL.

Hi All,
Can UTL package can be used to upload any local data file to server?
Or is there any in-built package which can be used to upload files to servers and copy files to another directory?
Thanks in advance.

Avishek wrote:
Thanks.
But i've a requirement to upload and copy files from one directory to another.
How can i approach?Realize we only know what you post & so far you have posted NOTHING useful.
How exactly does end user interact with the DB?
3-tier application?
EndUser<=>browser<=>WebServer<=>ApplicationServer<=>DatabaseServer
What OS name & version for client system?
Handle:      Avishek
Email:      [email protected]
Status Level:      Newbie (5)
Registered:      Jun 3, 2008
Total Posts:      68
Total Questions:      27 (16 unresolved)

Similar Messages

  • Minimum version required to upload and download files using Netweaver Gateway

    What is the minimum service pack required to use the feature of Upload and download files using netweaver gateway. I already have a SP05

    Hi,
    as per this blog How to Read Photo from SAP system using SAP Gateway this should be possible with SP05.
    also refer How To Upload and Download Files Using SAP NW Gateway SP06
    Regards,
    Chandra

  • How to upload and download files using FTP to a server(webserver) in JSP

    I have to upload and download multiple files Of(size >5 MB)using FTP to a
    Server(webserver) in JSP
    how to do that ?

    Or he could create his own tag libraries, no? :)One supposes that, technically, one could create a taglib wrapper around an existing FTP library. There might be licensing issues with distributing that taglib wrapper.
    Of course, one could find the FTP RFC online, read it, and implement one's own FTP client implementation, complete with a tag library access point.

  • Upload and Download file using MySQL database.

    Can anyone help me ....
    how to write a code to upload file to and retrieve file from MySQL database.
    The files may be .bmp , .wav, .zip, .exe and so on....
    thank you...

    Cross-posted and multi-posted.

  • Students unable to use Upload and Manage Files

    Our students have been unable to use the _Upload and Manage Files_ function since last week. They receive an *Access Denied* message as soon as they click the link. Here is our debug page:
    iTunes U Access Debugging
    Received
    Destination brockport.edu
    Identity Empty string
    Credentials Student@urn:mace:itunesu.com:sites:brockport.edu:classes:200901-1067-DCC-400-61
    Time 1232465069
    Signature aee5d3665e6350cb0e87df99810f690f4b7931110e85c4e016a86345cea63c3e
    Analysis
    The destination string is valid and the corresponding destination item was found.
    The identity string is valid but provides no identity information.
    The credential string is valid and contains the following recognized credential:
    1. Student@urn:mace:itunesu.com:sites:brockport.edu:classes:200901-1067-DCC-400-61
    The time string is valid and corresponds to 2009-01-20 15:24:29Z.
    The signature string is valid.
    Access
    Because the received signature and time were valid, the received identity and credentials were accepted by iTunes U.
    In addition, the following 2 credentials were automatically added by iTunes U:
    1. All@urn:mace:itunesu.com:sites:brockport.edu
    2. Authenticated@urn:mace:itunesu.com:sites:brockport.edu
    With these credentials, you have browsing and downloading access to the requested destination.
    There is a tab with +Drop Box+ access for Students and I even changed the page access to Shared for Students, but nothing has helped.

    Were you ever able to get this resolved? We have the same issue.
    Resolved, yes, to a point. After doing some extensive reading, I was able to determine that our fatal assumption was that the podcast media files would be hosted by Apple. According to at least one source, Apple has not offered hosting to new iTunesU accounts since January 2009.
    Therefore, the reason we did not have a button for "Upload and Manage Files" is because there was no place for us to upload them to.
    I have successfully attached feeds from both MobileMe and Podamatic and we are in the process of setting up our OS X Server with Podcast Producer. We will host the feeds locally and make them available through iTunes U, blogs and other channels.
    --Brad

  • Uploading and downloading files from a web app (Urgent!!)

    Hi everyone:
    I'm developing an application in PL/SQL to upload and download files from an HTML webpage. I congured the document table and the parameters necessary in the DAD of my application.
    when I upload the file using my webpage that file info is automatically uploaded to the doc table. This is as far as I have gotten.
    I need to do the following:
    - Place the uploaded file into a column in another table in my database as part of a text message (think of it as an email message), and delete the file from the doc table (as this is thought to be a temp table that holds the file when uploaded from my webpage)
    - Retreive the file so that it can be downloaded from another web page.
    The file can be a PDF, WORD DOC, etc...
    I now that I can do this with InterMedia but I haven't figured out how :(
    Can anyone please point me to an example or some documentation that can guide me through the process.
    DB VERSION: 8.1.7
    IAS VERSION: 1.0.2.2
    Thanks,
    Carlos Abarca

    The idea was for you to look at the code and get an idea of how to access the BLOB in the document table. IF you look at the procedure
    insert_new_photo( new_description IN VARCHAR2,
    new_location IN VARCHAR,
    new_photo IN VARCHAR2 )
    It shows how to access the blob that is stored in the document table. You can then copy this blob to your own table using the DBMS_LOB package.
    Hope this helps,
    Larry

  • I would like to upload a excel file using jsp

    Hi,
    I would like to upload the excel file using jsp in my netbeans ide. Please help.
    I don Know what is the error in this jsp file. It is not showing any thing and the file is also not getting uploaded.
    Please gothru the code below.
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ page import="java.io.*" errorPage="err.jsp"%>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="<html:rewrite page="/design.css" />" rel="stylesheet" type="text/css">
    <title>Upload Page</title>
    </head>
    <body onKeyDown="DisablingBackFunctionality()" onLoad="DisablingBackFunctionality()">
    <html:form action="download" >
    <div style="position:absolute; left:100;top:200;">Select an excel File :<input type="file" name="uploadfile"></div>
    <div style="position:absolute; left:190;top:250;"><input type="submit" name="Submit" value="Read"></div>
    <div style="position:absolute; left:336;top:250;"><input type="reset" name="Reset" value="Clear"></div>
    mainmenu
    </html:form>
    </body>
    </html>
    <%
    String contentType = request.getContentType();
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while (totalBytesRead < formDataLength) {
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    String file = new String(dataBytes);
    //out.println("<br> file :"+file);
    String saveFile = file.substring(file.indexOf("filename=\"") + 10);
    //out.println("<br> savefile :"+saveFile);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    //out.println("<br> now file1 :"+saveFile);
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1, saveFile.indexOf("\""));
    //out.println("<br> now file2 :"+saveFile);
    //out.print(dataBytes);
    String ext = "";
    if (saveFile.indexOf(".") != -1) {
    ext = saveFile.substring(saveFile.lastIndexOf("."));
    int lastIndex = contentType.lastIndexOf("=");
    //out.println("<br>lst index of"+lastIndex);
    String boundary = contentType.substring(lastIndex + 1, contentType.length());
    //out.println("<br> boundary"+boundary);
    //out.println("<br> file :"+file);
    int pos;
    pos = file.indexOf("filename=\"");
    //out.println("<br> now 0 :"+pos);
    pos = file.indexOf("\n", pos) + 1;
    //out.println("<br>now 1 :"+pos);
    pos = file.indexOf("\n", pos) + 1;
    //out.println("<br>now 2 :"+pos);
    pos = file.indexOf("\n", pos) + 1;
    //out.println("<br>now 3"+pos);
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    FileOutputStream fileOut = new FileOutputStream("D:\\" + saveFile);
    //FileOutputStream fileOut = new FileOutputStream(saveFile);
    //fileOut.write(dataBytes);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush();
    fileOut.close();
    session.setAttribute("fil", saveFile);
    //out.println("File saved as " +saveFile);
    %>
    <script type="text/javascript" >
    function DisablingBackFunctionality()
    var URL;
    var i ;
    var QryStrValue;
    URL=window.location.href ;
    i=URL.indexOf("?");
    QryStrValue=URL.substring(i+1);
    if (QryStrValue!='X')
    window.location=URL + "?X";
    </script>
    Please let me know the result as soon as possible. Its my very urgent.
    Thanking Yu,
    Muthu Kumar.R

    No.
    Mylenium

  • How to upload an excel file using ABAP.

    Hi,
    Can anyone please help me in understanding how to upload an excel file using ABAP.
    Thanks!!

    http://diocio.wordpress.com/2007/02/12/sap-upload-excel-document-into-internal-table/
    check the link
    TYPES: Begin of t_record,
    name1 like itab-value,
    name2 like itab-value,
    age   like itab-value,
    End of t_record.
    DATA: it_record type standard table of t_record initial size 0,
    wa_record type t_record.
    DATA: gd_currentrow type i.
    *Selection Screen Declaration
    PARAMETER p_infile like rlgrap-filename.
    *START OF SELECTION
    call function ‘ALSM_EXCEL_TO_INTERNAL_TABLE’
    exporting
    filename                = p_infile
    i_begin_col             = ‘1&#8242;
    i_begin_row             = ‘2&#8242;  “Do not require headings
    i_end_col               = ‘14&#8242;
    i_end_row               = ‘31&#8242;
    tables
    intern                  = itab
    exceptions
    inconsistent_parameters = 1
    upload_ole              = 2
    others                  = 3.
    if sy-subrc <> 0.
    message e010(zz) with text-001. “Problem uploading Excel Spreadsheet
    endif.
    Sort table by rows and colums
    sort itab by row col.
    Get first row retrieved
    read table itab index 1.
    Set first row retrieved to current row
    gd_currentrow = itab-row.
    loop at itab.
      Reset values for next row
    if itab-row ne gd_currentrow.
    append wa_record to it_record.
    clear wa_record.
    gd_currentrow = itab-row.
    endif.
    case itab-col.
    when ‘0001&#8242;.                              “First name
    wa_record-name1 = itab-value.
    when ‘0002&#8242;.                              “Surname
    wa_record-name2 = itab-value.
    when ‘0003&#8242;.                              “Age
    wa_record-age   = itab-value.
    endcase.
    endloop.
    append wa_record to it_record.
    *!! Excel data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
    loop at it_record into wa_record.
    write:/     sy-vline,
    (10) wa_record-name1, sy-vline,
    (10) wa_record-name2, sy-vline,
    (10) wa_record-age, sy-vline.
    endloop.

  • Upload and Download Files in an Application

    hi,
    I'm use Application Express 2.1.0.00.39 and the procedure " How to Upload and Download Files in an Application" :
    http://download-west.oracle.com/docs/html/B16376_01/up_dn_files.htm#sthref177
    I do not find the following tables or view:
    HTMLDB_APPLICATION_FILES or wwv_flow_file_objects$.
    which it is my error?
    thanks.
    Luigi

    The documentation was for version 2.2. I could not find a 2.0 version of this howto:
    http://download-west.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm#CIHCFCHF
    However, I did find the correct name of the view for my version, HTMLDB_APPLICATION_FILES
    After following the instructions in the above-mentioned "how to" (uploading and downloading files), I am a getting a html 403 error (You are not authorized to view this page) when I try to download from my custom table using the procedure specified in the howto.
    I've granted execute on the procedure to public only (as specified in the doco).
    err nvm. This has already been answered,
    http://download-west.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/adm_wrkspc.htm#BEJCGJFJ.
    Message was edited by:
    user507810

  • Uploading and Downloading files in an Applicaiton

    I was able to successfully upload and download files stored in the database through Application Express by following the how to instructions at -->
    http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm#CJAHDJDA
    QUESTION: Is it possible to retrieve the downloaded file without granting execute to the download procedure? My DBA is requesting that I remove the procedures public grant, but when I do, I can no longer download the file.

    As long as the Oracle username with the connection has 'execute' on the package 'public' should not need execute. Though I do not use the tools in question so there may be factors I am unaware of, but Oracle wise the connected session needs execute. If can get it from public, a role, or a direct grant. I just say use role based grants or direct grants rather than a public grant to get the privilege.
    HTH -- Mark D Powell --

  • HTML tag to upload and Download files

    hello all
    IS there any HtTML tag to upload and download files ???
    rgds
    ASHWIN

    Yea, for downloading you can use a normal link. For uploading, you need an html form like
    <form name="form1" enctype="multipart/form-data" method="post" action="doSomething.jsp">
      <input type="file" name="file">
    </form>To be honest I know nothing about jsp and servlets yet, but I would guess that it works just the same as with php, with which I am alot more familiar. Basicly, the form tag with the input type="file" tag tells the form to submit your file to the webserver.
    Then, whatever script you call with action="anythingYouWantHere" will handle the file the user submitted. There must be very similar functions to handle them in java than there is in php.
    Things to look for with file upload that often are buggy is the permissions / security settings you have on your webserver. Sometimes you need to make a special folder with extra permissions to allow you upload to work.
    Thats about all I know on this matter, good luck :)

  • Renaming and copying files (Bridge CS3)

    Hi -- Scripting bridge, I am able to copy files using the copyTo(target) function.
    I also can rename files using the Javascript file.rename() function.
    But I am having trouble doing both in concert.
    If I rename before I copy, I lose the reference to the selected thumb, and I cannot copy it.
    I have tried using the Javascript file.copy() function with no success.
    Does anyone have any suggestions how I can approach this problem?
    thanks in advance

    Don't you just need to cancat the folder that you have as target and the thumbs name in a new file object?
    #target bridge
    var thisFolder = Folder.desktop;
    var thisFile = app.document.selections[0];
    if (thisFile.type == 'file') {
         if (thisFile.copyTo(thisFolder)) {
              var newFile = File(thisFolder.fsName + '/' + thisFile.name);
              newFile.rename('SomeNewName');

  • How can I upload and download files with uiXML?

    I want to implement upload and download files with uiXML. In some previouse topic I got answare to look in AbstractPageBroker class in JavaDOC. I did it but this is a very-very little resolution description for this problem. I think for developers YOU (UIX Team) must in very quick time to put some examples on the NET because this is a nice technology but with adecvate samplase and developers guide it will be dead very soon. I digging this forum for information. I see many many people have same problems about this technology. They like it and want to use and try but documentation is very very poor.
    WE WANT EXAMPLES and separate forum for UIX. I think it deserve this.
    If You have any more detailed documentation would be nice to put on the net. I have uixdemo.zip file but this is in very early fase of development. I downloaded it before fwe months. And now I can't find it anymore on youre site. What happend?

    Attila -
    I went back and re-read the JavaDoc for AbstractPageBroker and MultipartFormItem and put together the following sample PageBroker based on the description from the JavaDoc:
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.share.util.MultipartFormItem;
    import oracle.cabo.servlet.xml.UIXPageBroker;
    * An extension of UIXPageBroker which stores all uploaded
    * files in the temporary directory.
    public class UploadingPageBroker extends UIXPageBroker
    * Override of AbstractPageBroker.doUploadFile() which saves
    * all files to the temporary directory.
    protected String doUploadFile(
    BajaContext context,
    Page page,
    MultipartFormItem item) throws IOException
    // Get the location of the file to create in the temp directory.
    // Of course a real application probably wouldn't upload files to
    // the temp directory - just using this contrived example to
    // demonstrate basic uploading support.
    File file = _getFile(context, item);
    if (file != null)
    // Create a FileOutputStream. Of course, a real application would
    // probably want to buffer the output
    FileOutputStream out = new FileOutputStream(file);
    // Write out the file
    item.writeFile(out);
    // Close up the output stream
    out.close();
    // We can return a value here to add to the PageEvent
    // if so desired.
    return null;
    // Gets the File for the item that we are uploading
    private File _getFile(
    BajaContext context,
    MultipartFormItem item
    // Get the file name
    String name = item.getFilename();
    // If we don't have a file, bail...
    if (name == null)
    return null;
    // Get the path to the temporary directory
    File dir = _getTempDir();
    // Return the File object
    return new File(dir, name);
    // Returns the path to the temprary directory
    private File _getTempDir()
    // Get the temporary directory from the ServletContext
    ServletConfig sConfig = getServlet().getServletConfig();
    ServletContext sContext = sConfig.getServletContext();
    return (File)sContext.getAttribute("javax.servlet.context.tempdir");
    In this sample, each uploaded file is simply saved in the temporary directory. You'll want to replace the code that creates the FileOutputStream for the uploaded file to use whatever OutputStream makes sense for your application.
    BTW - I used the following UIX page to test this out:
    <?xml version="1.0" encoding="UTF-8"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller">
    <content>
    <pageLayout xmlns="http://xmlns.oracle.com/uix/ui">
    <contents>
    <form name="uploadForm" usesUpload="true">
    <contents>
    <fileUpload name="uploadedFile"/>
    <submitButton name="upload" text="Upload"/>
    </contents>
    </form>
    </contents>
    </pageLayout>
    </content>
    </page>
    Hope this sample helps with the uploading part of your question. I'll see if I can provide a download sample in a later post.

  • About "Upload and download files from ADF into blob type colum."

    hi
    Using JDeveloper 10.1.3.3.0 I have tried the example available for download from this blog post by Jakub Pawlowski:
    "Upload and download files from ADF into blob type colum."
    at http://kuba.zilp.pl/?id=1
    First a thank you to Jakub for this interesting example.
    I have a question about a PDF file that I uploaded using the example.
    The file has a size of 10445518 bytes.
    After I upload that file, the blob column has a value with a size of 10445516 bytes, 2 bytes less.
    SQL> select file_name, dbms_lob.getlength(stored_file) from blob_table;
    FILE_NAME
    DBMS_LOB.GETLENGTH(STORED_FILE)
    ADF-DeveloperGuide-4GL-B25947_01.pdf
                           10445516If I download that file using the example, it has the same size as the blob value, 10445516 bytes.
    If I open the downloaded file, using Adobe Reader 8.1.1, it first shows this message:
    "The file is damaged but is being repaired."
    After that, there is not problem using the PDF file in Adobe Reader.
    I have tried this with both Internet Explorer 6 and Firefox 2.0.0.11.
    I have also tried this with other (smaller) files, and those upload and download correctly.
    question:
    Why are those 2 bytes lost during upload?
    many thanks
    Jan Vervecken

    Hi!
    I can only post you my code that works for me and as I said I had same problems but can't remember what solved them. My code:
      public void fileUploaded(ValueChangeEvent event)
        FacesContext fc = FacesContext.getCurrentInstance();
        UploadedFile file = (UploadedFile) event.getNewValue();
        if (file != null && file.getLength() > 0)
          // here I have some messages written and a call to the method on AM to save the uploaded file to the DB
      private BlobDomain newBlobDomainForInputStream(InputStream in)
        throws SQLException, IOException
        BlobDomain loBlob = new BlobDomain();
        OutputStream out = loBlob.getBinaryOutputStream();
        writeInputStreamToWriter(in, out);
        in.close();
        out.close();
        return loBlob;
      private static void writeInputStreamToWriter(InputStream in,
                                                   OutputStream out)
        throws IOException
        byte[] buffer = new byte[8192];
        int charsRead = 0;
        while ((charsRead = in.read(buffer, 0, 8192)) != -1)
          out.write(buffer, 0, charsRead);
       * Launch the upload - see fileUploaded() for actual upload handling.
       * @return null navigation event - we stay on this page
      public String UploadButton_action()
        if (this.getMyInputFile().getValue() == null)
          FacesContext context = FacesContext.getCurrentInstance();
          FacesMessage message =
            new FacesMessage(FacesMessage.SEVERITY_WARN, JSFUtils.getStringFromBundle("fileupload.emptyfielderror"),
                             null);
          context.addMessage(this.getMyInputFile().getId(), message);
        return null;
       * Setter for inputFile UI Component.
       * @param inputFile inputFile UI component
      public void setMyInputFile(CoreInputFile inputFile)
        this.myInputFile = inputFile;
       * Getter for inputFile UI Component.
       * @return inputFile UI component
      public CoreInputFile getMyInputFile()
        return myInputFile;
      }fileUploaded is a valueChangeListener on inputFile and UploadButton_action is as the name says the action for upload button.
    Hope this helps. If not, than your problem is probably not the same as mine was, although the message about file corrupted was the same.
    Next thing you can check in this case is if your file exceeds max file upload size. I don't know the exact default value, but if the file is too long I think this upload logic will upload only a part of the file and save it to the DB which can also lead to the same file corrupted error.
    You can set the max upload value in web.xml like this:
    <context-param>
    <!-- Maximum memory per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_MEMORY</param-name>
    <!-- Use 5000K -->
    <param-value>5120000</param-value>
    </context-param>
    <context-param>
    <!-- Maximum disk space per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_DISK_SPACE</param-name>
    <!-- Use 10,000K -->
    <param-value>15360000</param-value>
    </context-param>

  • Our admins don't see "Upload and Manage Files" - even the Primary Admin.  Why?

    We are setting up our iTunes U site for the first time.  NONE of our admins, including the primary admin, can see the "Upload and Manage Files" link in the Tools section, when we are editing a Course page.  We can set up Course pages all day long, but we cannot upload content.  Obviously this is a show-stopping problem, and so far nobody from Apple has been able to tell us why.
    Any suggestions?  Thanks in advance,
    -- Will

    Greetings Will;
    Are you and your Administrators using iTunes U Public Site Manager to edit your content or does your tools section look like the attached screen capture? 
    Syd Rodocker
    iTunes U Administrator
    Tennessee State Department of Education
    Tennessee's Electronic Learning Center

Maybe you are looking for