B4J Question Can't get an event with download2

Discussion in 'B4J Questions' started by schimanski, Jun 26, 2015.

  1. schimanski

    schimanski Well-Known Member Licensed User

    When I download a file from my server, i don't get an handler-result. I don't know, how I can read out the parameters, when I download a file such as

    Kontaktstempel.Download2(ServerPfad & "/Kontakte/Kontaktstempel.eis"Array As String("type""download""passwort""1234"))
    When I upload, I can check the parameter in the

    Sub Handle(req As ServletRequest, resp As ServletResponse)
    But it is not possible to to this after a download request...
  2. derez

    derez Expert Licensed User

    What I do (and there may be other ways) - I have an index file in my static folder, which directs to a download handler with the password entered by the user. In the handler module I check the passwod parameter.

    index file:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns=
    <link rel=
    "stylesheet" type="text/css" href="index.css" />
    <title>Dudu Files - login</title>
    <script src=

    form name="input" action="http://[my duckdns]:XXXXX/download" method="get">
    Password: <input 
    type="text" name="Password" value="">
    type="submit" value="Submit">
    Sub Handle(req As ServletRequest, resp As ServletResponse)
    Dim sb As StringBuilder
    If req.GetParameter("Password") <> "YYYYYYYY" Then
    "<br/><h1> Wrong Password ! </h1>")
    End If
  3. schimanski

    schimanski Well-Known Member Licensed User

    Thanks for your solution..I will try it...seems to be tricky:D
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice