how to select multiple files from file upload using a button


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: how to select multiple files from file upload using a button

  1. #1
    Join Date
    Dec 2006
    Posts
    1

    how to select multiple files from file upload using a button

    hi
    how to select multiple files from file upload browser,
    i need to get file upload browser window by using button,instead of using <input type="file">
    after selecting the file it has to be placed in a table and have to retriev that file by using struts action...i have to use jsp,struts.

    Thanks in advance
    sandesh

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    Implement a JFileChooser. Take a look at:

    http://java.sun.com/docs/books/tutor...lechooser.html

  3. #3
    Join Date
    Jul 2007
    Posts
    8

    download file issue with firefox, please help

    Public Sub DownloadFile(ByVal strFileFullName As String, Optional ByVal strContentType As String)
    Dim sFilePath As String
    Dim strFileName As String
    Dim strDebug As String

    strFileName = GetFileName(strFileFullName)
    If strFileName = "" Then
    m_objResponse.Write "Filename Not specified."
    m_objResponse.End
    End If

    'Start the download process if all is good
    m_objResponse.Clear
    m_objResponse.ContentType = "application/octet-stream"
    m_objResponse.AddHeader "content-disposition", "attachment; filename=" & strFileName
    strDebug = "FileName : " & strFileName
    'use stream to write file
    Dim adoStream
    Set adoStream = CreateObject("ADODB.Stream")
    strDebug = "adoStream begin : " & strFileName
    adoStream.Open
    adoStream.Type = 1
    strDebug = "adoStream : " & strFileFullName
    adoStream.LoadFromFile (strFileFullName)
    m_objResponse.BinaryWrite adoStream.Read()
    adoStream.Close
    Set adoStream = Nothing
    m_objResponse.End

    End Sub

    When I call from my asp page HIRExFileDownload.DownloadFile(strDownFile) to the downloadFile function in a dll(it is in dll, wrote by VB6), some how the file name is changed to "File1.pdf," follow the file name extention, there is a comma added like "pdf," that caused the download file problem. is there anyone know what's wrong with the DownloadFile function. It is working with IE, but is not work for Firefox. Please help.

    Thanks,
    Amy

  4. #4
    Join Date
    Jul 2007
    Posts
    8

    download file issue with firefox, please help

    Public Sub DownloadFile(ByVal strFileFullName As String, Optional ByVal strContentType As String)
    Dim sFilePath As String
    Dim strFileName As String
    Dim strDebug As String

    strFileName = GetFileName(strFileFullName)
    If strFileName = "" Then
    m_objResponse.Write "Filename Not specified."
    m_objResponse.End
    End If

    'Start the download process if all is good
    m_objResponse.Clear
    m_objResponse.ContentType = "application/octet-stream"
    m_objResponse.AddHeader "content-disposition", "attachment; filename=" & strFileName
    strDebug = "FileName : " & strFileName
    'use stream to write file
    Dim adoStream
    Set adoStream = CreateObject("ADODB.Stream")
    strDebug = "adoStream begin : " & strFileName
    adoStream.Open
    adoStream.Type = 1
    strDebug = "adoStream : " & strFileFullName
    adoStream.LoadFromFile (strFileFullName)
    m_objResponse.BinaryWrite adoStream.Read()
    adoStream.Close
    Set adoStream = Nothing
    m_objResponse.End

    End Sub

    When I call from my asp page HIRExFileDownload.DownloadFile(strDownFile) to the downloadFile function in a dll(it is in dll, wrote by VB6), some how the file name is changed to "File1.pdf," follow the file name extention, there is a comma added like "pdf," that caused the download file problem. is there anyone know what's wrong with the DownloadFile function. It is working with IE, but is not work for Firefox. Please help.

    Thanks,
    Amy

Similar Threads

  1. Randomized Results from multiple text files
    By LordNightwinter in forum VB Classic
    Replies: 1
    Last Post: 09-06-2006, 04:15 PM
  2. Replies: 0
    Last Post: 08-28-2006, 02:58 AM
  3. Replies: 5
    Last Post: 08-18-2006, 02:15 PM
  4. wav file fade in out help
    By jase_dukerider in forum C++
    Replies: 2
    Last Post: 04-14-2005, 08:48 PM
  5. Replies: 0
    Last Post: 03-09-2005, 06:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center