Re:How to save an uploaded file in specified folder

Hi all,
I am using Jdev 11.1.1.7.0
i created one form in the page.i created attachments by using inputfile option in component palette.when i run the page it is working.the file is successfully uploaded.but my intension is i want to save the uploaded file in specified location for the particular person.so how can i save this file.can anyone help me out please.
Thanks,
G.Shilpa.

Hi Timo,
Thanks for the reply.my scenario is i have created one table and one form.i entered some data in it.i used inputfile and save button for attachments.it is working.bt it wont be saved.when i click the person and then upload a file then the file will be stored some particular location for the particular person.means when i reload this page again i click the person it want to show the person how many pages uploaded.i created one bean class in save button and inputfile.my code is
public class FileUpload {
    private List<UploadedFile> uploadedFile;
    public FileUpload() {
        super();
    public void setUploadedFile(List<UploadedFile> uploadedFile) {
        this.uploadedFile = uploadedFile;
    public List<UploadedFile> getUploadedFile() {
        return uploadedFile;
    public void saveUploadedFiles(ActionEvent actionEvent) {
        // Add event code here...
        List<UploadedFile> files = this.getUploadedFile();
        if (files != null) {
            for (int i = 0; i < files.size(); i++) {
                System.out.println(files.get(i).getFilename());
if anything goes wrong can u please provide the code.
Thanks,
G.Shilpa.

Similar Messages

  • Save an uploaded file in struts 2.0

    Hi
    I am working on the video hosting website where users can upload videos, I am able to save the uploaded file if I give the absolute path in my java file where as when I think it will be a better idea if I can use a relative path, because when I will be uploading the file on the web server than I cant use the absolute path, does any one know how to make the path relative in case of struts ?
         private File upload;
         private String uploadContentType;
         private String uploadFileName;
         private String caption;
         public String execute() throws Exception{
              try {
                   String fullFileName = "c:/projectTest/videosDirectory/sample.avi";
                   File theFile = new File(fullFileName");
                   System.out.println(fullFileName);
                   FileUtils.copyFile(upload, theFile);
              } catch (Exception e) {
                   addActionError(e.getMessage());
                   return INPUT;
              return SUCCESS;
    {code}
    I want the variable fullFileName as "/videosDirectory" so that it can automatically compute the path and save the file. or is there any better way ?
    Any help highly appreciated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    sid_0404 wrote:
    Hi
    I am working on the video hosting website where users can upload videos, I am able to save the uploaded file if I give the absolute path in my java file where as when I think it will be a better idea if I can use a relative path...Relative to what?
    In file paths, a relative path is relative to the current working directory. And in an application server, the current working directory isn't related to your application (or any of the other applications) in any way. So that's unlikely to be what you want.
    So, relative to what?

  • Please can someone tell me how to save a MP3 file from my email on my iPad so I can put in on Facebook? Thankyou

    Please can someone tell me how to save a MP3 file from my email on my iPad so I can put it on Faceboo? I use hotmail and please tell me step by step as I am not a tech guru lol. Thankyou

    Hi jscher200,
    Thank you for your reply, sorry for the VERY late late response, but I have just figured out how to control this separate 'panel'. I find it really useful for monitoring Google Analytics in as it can just sit there running. It does have its limitations, as it's a limited size (you can't expand it to full screen view), so you can only ever see a vertical section of a website and need to scroll to look to the right or left, but I have the live view of people accessing my website running on there and if the numbers start racking up at any time, I can scroll to look and see what pages they are accessing, where they've been referred from, etc.
    To get it to work, you save a website address in the Bookmarks Toolbar and when you can see it sitting on the toolbar at the top of the screen with its little icon, right click on it then click 'properties', then tick the box 'Load this bookmark in the sidebar'. The next time you click on this bookmark to open the website, it will load in this sidebar, which looks like a separate 'window' but is immovable. You can only have one sidebar application running at a time, but can change it by right clicking on the bookmark you want to load in there and it will then change to that one next time you click on that bookmark.
    I hope this might be useful to others, as I asked for help with this on loads of forums and not one person knew that this existed - even really skilled techies!

  • Save the uploaded file in a different name ?

    Has anyone used the com.oreilly.MultipartRequest Class
    which is used to upload a file to a directory.I am able to that
    fine.I now need a way to save the uploaded file to a different name
    when it gets saved in its destination.I am not sure if com.oreilly.MultipartRequest class has a feature or not.Can
    anyone help me out of this please.

    you can create files with your own name.
    in temp directory, orielly package creates all the files you uploaded from the client.
    create FileInputStream of file you need , create FileOutputStream with your new name and write the content to it.
    here is some code,
    MultipartRequest multi = new MultipartRequest(req,tempUserFile.getAbsolutePath(),100*1024*1024); // current dir
              Enumeration files = multi.getFileNames(); // Collection of files
              // it sends to you with the form
              String fileName=null;
              String name =null;
              while(files.hasMoreElements())
                   name = (String)files.nextElement();
                   File f = multi.getFile(name);
                   fileName = multi.getFilesystemName(name);
                   FileInputStream fis = new FileInputStream(f);
    FileOutputStream fos = new FileOutputStream//create outputstreamwith your new name
    now dump contents of inputstream to outputstream.
    hope this helps.
    raheem

  • How do I save a pdf file to a folder?

    How do I save a pdf file to a folder?

    Hi,
    Are you trying to save your PDF files from Acrobat.com to your folder in our computer?
    If so, download your PDF files from https://files.acrobat.com to your local folder.
    Please let me know if I did not answer your question.
    Hisami

  • How to download and upload files in Java?

    Hi, everyone
    How to download and upload files in Java? Do you have some references about this issue or some valuable web link�? Thanks!
    Best Regards,
    Hai.Ren

    This is too vague a question, please be more specific. What protocol would you like to use? HTTP? FTP? Something else?

  • How to save the report file in network drive

    Hi experts,
    Can any one of you pls tell me how can  save the report file in network drive.
    My requirement:
    by running a report i wll get daily data into a list.SO, i want to keep this in a common drive (network drive:Z) where every one can acces the txt file.
    I want the code in SAP to design this.
    Awaiting for an early reply.

    Is the Z drive in the application or presentation server ?
    make sure the server has write access to the required folder
    for presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = 'c:\test_xls.xls'
        filetype              = 'ASC'
        write_field_separator = 'X'
      TABLES
        data_tab              = itab.
    for the application server, use
    data: outfile(120).
      OPEN DATASET outfile FOR APPENDING IN TEXT MODE ENCODING DEFAULT.

  • How to associate an uploaded file with form data

    I have a "ticketing" app which stores a ticket no. as well as allows users to upload multiple files per ticket. The problem I am having is how to associate an uploaded file with a particular ticket no. As you can guess this becomes complicated when the same user can potentially update multiple tickets using the same file names. I am having difficulty trying to understand how to associate a ticket no with one or more uploaded files. I do have a custom table which I update with the attachments but I am unsure how to, or when to, update the ticket information on this custom table. I only want to retrieve attachments for a given ticket, not all attachments uploaded by a user.Does anyone have any ideas?

    Hi,
    My question is bit related to this topic.
    I am having a requirement to upload the CSV files so that they will store in a database table and later on wards when they search on that table it needs to pull the information and display on the form. I am a new bee to application express. Could some body tell me how to start this process with??. Just give me an overvoew/hints so that I will try to carry on my own.
    Cheers,
    Krishna.

  • How do I access uploaded files ?

    How can I access uploaded files which have seemed to have vanished ?

    Hi,
    Please log in https://files.acrobat.com with your Adobe ID and pasdword and sort your file by "Date Added" and check if you can find the uploaded file.
    Hisami

  • How to save a numbers file to a pdf file of multiple pages instead of one giant long page?

    How to save a numbers file to a pdf file of multiple pages instead of one giant long page?

    Hi DW,
    Numbers 3.2.2
    Instead of Menu > File > Export To,  use Menu > File > Print...
    That takes you to Print Preview.
    In the Print Setup panel, Click on the Print... button lower right (it won't print yet).
    That opens the Print Dialogue.
    Click on the PDF Pop-Up Menu lower left.
    Choose Open PDF in Preview or Save as PDF.
    That will have page breaks and will be full sized.
    Print from Preview.
    Regards,
    Ian.

  • How to save my bookmarks in a protected folder(google has an add on for favorits which will never be deleted) in case of harddisk format or computer crashdown?

    how to save my bookmarks in a protected folder(google has an add on for favorits which will never be deleted) in case of harddisk format or computer crashdown.

    The built-in Firefox Sync service allows you to store your settings, including bookmarks, on a Mozilla server. This isn't accessible as a file like Google Drive; it can only be used by connecting another copy of Firefox to your Sync account. You can read more about this here: [[How do I set up Firefox Sync?]] (I haven't tried it myself since it changed recently.)
    The cross-browser Xmarks service is more focused: it just does bookmarks. http://www.xmarks.com/ (I've never tried this one either)
    If you prefer working with files and you have a Dropbox or similar account, you could in theory back up your Firefox profile folder, or more particularly, the bookmarkbackups subfolder. I haven't tried that myself. To find the folder:
    Open your current Firefox settings (AKA Firefox profile) folder using either
    * "3-bar" menu button > "?" button > Troubleshooting Information
    * Help menu > Troubleshooting Information
    In the first table on the page, click the "Show Folder" button
    A window should launch showing your currently active settings files. The bookmarkbackups folder should contain dated .json files which can be used to restore your bookmarks to another copy of Firefox.
    Alternately, someone might have created an add-on for saving Firefox bookmarks to the cloud another way, but I haven't heard of one.

  • How to save 2-3 doc in one folder on ipad

    How to save 2-3 doc in one folder on ipad.

    Got it figured out ... but I'll repeat it here in case it helps others.
    When I went to "Documents" it was always bringing me into a subfolder within (probably where I'd last been). And I think I had so many files in Documents from trying over and over that if I ever did end up there, I wasn't finding what I'd just opened because there were so many.
    Thanks again for your help!

  • 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 find number of files in a folder using pl/sql

    please someone guide as to how to find number of files in a folder using pl/sql
    Regards

    The Java option works well.
    -- results table that will contain a file list result
    create global temporary table directory_list
            directory       varchar2(1000),
            filename        varchar2(1000)
    on commit preserve rows
    -- allowing public access to this temp table
    grant select, update, insert, delete on directory_list to public;
    create or replace public synonym directory_list for directory_list;
    -- creating the java proc that does the file listing
    create or replace and compile java source named "ListFiles" as
    import java.io.*;
    import java.sql.*;
    public class ListFiles
            public static void getList(String directory, String filter)
            throws SQLException
                    File path = new File( directory );
                    final String ExpressionFilter =  filter;
                    FilenameFilter fileFilter = new FilenameFilter() {
                            public boolean accept(File dir, String name) {
                                    if(name.equalsIgnoreCase(ExpressionFilter))
                                            return true;
                                    if(name.matches("." + ExpressionFilter))
                                            return true;
                                    return false;
                    String[] list = path.list(fileFilter);
                    String element;
                    for(int i = 0; i < list.length; i++)
                            element = list;
    #sql {
    insert
    into directory_list
    ( directory, filename )
    values
    ( :directory, :element )
    -- creating the PL/SQL wrapper for the java proc
    create or replace procedure ListFiles( cDirectory in varchar2, cFilter in varchar2 )
    as language java
    name 'ListFiles.getList( java.lang.String, java.lang.String )';
    -- punching a hole in the Java VM that allows access to the server's file
    -- systems from inside the Oracle JVM (these also allows executing command
    -- line and external programs)
    -- NOTE: this hole MUST be secured using proper Oracle security (e.g. AUTHID
    -- DEFINER PL/SQL code that is trusted)
    declare
    SCHEMA varchar2(30) := USER;
    begin
    dbms_java.grant_permission(
    SCHEMA,
    'SYS:java.io.FilePermission',
    '<<ALL FILES>>',
    'execute, read, write, delete'
    dbms_java.grant_permission(
    SCHEMA,
    'SYS:java.lang.RuntimePermission',
    'writeFileDescriptor',
    dbms_java.grant_permission(
    SCHEMA,
    'SYS:java.lang.RuntimePermission',
    'readFileDescriptor',
    commit;
    end;
    To use:
    SQL> exec ListFiles('/tmp', '*.log' );
    PL/SQL procedure successfully completed.
    SQL> select * from directory_list;
    DIRECTORY FILENAME
    /tmp X11_newfonts.log
    /tmp ipv6agt.crashlog
    /tmp dtappint.log
    /tmp Core.sd-log
    /tmp core_intg.sd-log
    /tmp da.sd-log
    /tmp dhcpclient.log
    /tmp oracle8.sd-log
    /tmp cc.sd-log
    /tmp oms.log
    /tmp OmniBack.sd-log
    /tmp DPISInstall.sd-log
    12 rows selected.
    SQL>

  • File upload error: Error uploading file. Error moving uploaded file from temporary folder. (FILE_UPL

    what causes this error:
    File upload error: Error uploading file. Error moving uploaded file from temporary folder. (FILE_UPLOAD_ERROR)

    On 5/17/07 4:26 PM, in article [email protected],
    "Gü[email protected]" <> wrote:
    >
    > To my experience servers behave differently -- on some I really had to use
    > 777, others are happy with 755.
    >
    > in regards to "any user" :: On most ADDT respectively MX Kollection - based
    > backends I made the image & file upload feature available to user having e.g.
    > the "levels" 1 & 2, but not 3 -- I wouldn´t expose something like this to all
    > users
    >
    > Günter Schenk
    > Adobe Community Expert, Dreamweaver
    My backend is only for admin, so they are the only ones who can access the
    upload pages. My concern is an images folder on the site being 777. Can't
    anyone from the outside plant a file in that folder if they just know where
    to find it using an ftp program? ?

Maybe you are looking for

  • Using an external camera for live video

    I have a Canon Vixia video camera that I would like to use to do Skype, etc. How do I connect it to the Mac Pro so it will recognize the camera? I have

  • BDC ok_code

    Hi,   Please let me know BDC ok_code for scroll down functionality in ME21n. i tried using '=P+' it is not working. Please suggest. Thank you. Regards, venkatesh

  • Req Help on Query name

    Hi All I need a report where we can see the User Usage of queires,, I Have installed Statistics also, but not able to find the exact query. If anybody worked please let me know. Or let me know how to create a custom query Appreciate your help Regards

  • Statement could not be reached

    does anyone know what "statement could not be reached means" thanks

  • Microsoft Security Advisory (2757760): Vulnerabil​ity in Internet Explorer

    Vulnerability in Internet Explorer Could Allow Remote Code Execution Microsoft is investigating public reports of a vulnerability in Internet Explorer 6, Internet Explorer 7, Internet Explorer 8, and Internet Explorer 9. Internet Explorer 10 is not a