Results 1 to 3 of 3

Thread: upload file to web site without dialog box using input

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2016
    Posts
    11

    upload file to web site without dialog box using input

    I want to send a file to a website without opening any window, I got using:

    Code:
    For Each OneElement In CaptchaBrowser.Document.GetElementsByTagName("input")
                If OneElement.GetAttribute("type") = "file" Then
                    If OneElement.GetAttribute("name") = "file" Then
                        Dim tr As New System.Threading.Thread(AddressOf SendK)
                        tr.Start()
                        OneElement.InvokeMember("click")
                        tr.Abort()
                    End If
                    Exit For
                End If
            Next
    
     Private Sub SendK()
            Threading.Thread.Sleep(2000)
            SendKeys.SendWait("mame") 'name of file, enter text letter by letter
            SendKeys.SendWait(Chr(13)) ' click the submit button
        End Sub
    the html of web site
    HTML Code:
    <input name="file" size="20" type="file">
    I got this way, more so opens a window to select the file location has somehow I just set the file path without opening anything? need help , tranks

  2. #2
    Frenzied Member
    Join Date
    Oct 2012
    Location
    Tampa, FL
    Posts
    1,187

    Re: upload file to web site without dialog box using input

    AFAIK you cant upload a file without using the dialog box

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2016
    Posts
    11

    Re: upload file to web site without dialog box using input

    I do not really give more solved my problem because the site accept send the image to text using base64

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width