Skip to Content
author's profile photo Former Member
Former Member

FileUpload - HTMLB - Help

I would like download a file from client to Server machine. I tried using FileUpload HTMLB component.

I am not sure how to read the File after getting getFile - IFileParam..

Can anybody help me out with this..

Any help is appreciated.

Thanks,

Elam

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jan 27, 2004 at 03:39 PM

    Elam

    There is a method getFile() for the IFileParam object which returns the File object

    D

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 17, 2004 at 08:51 PM

    Hi, there is also an example in the PDK documentation:

    public void onLoadFile(Event event) {

    FileUpload fu = (FileUpload) this.getComponentByName("myfileupload");

    // this is the temporary file

    if (fu != null) {

    // Output to the console to see size and UI.

    System.out.println(fu.getSize());

    System.out.println(fu.getUI());

    // Get file parameters and write it to the console

    IFileParam fileParam = fu.getFile();

    System.out.println(fileParam);

    // Get the temporary file name

    File f = fileParam.getFile();

    String fileName = fileParam.getFileName();

    // Get the selected file name and write ti to the console

    ivSelectedFileName = fu.getFile().getSelectedFileName();

    System.out.println("selected filename: "+ivSelectedFileName);

    }

    }

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.