It still does not work but I made some progress.

1. In my test environment, A4D demo sometimes works but not all the time. It
means that the first request works but then the second fails (the 4D process
hangs up to timeout). Stopping the web request at the browser level than
issuing a submit again works. Can't explain why.

2. In the production environment, I deleted the A4D upload directory and
also changed the name of the upload variable to A4D_Upload (Compiler Web and
form) then restarted 4D server. A new upload directory was automatically
created. Since then the -43 has disappeared.

3. I changed my form processing script to purely display the upload results
as per the demo file. I simply added the display of A4D_Error.

Below is the form that I use :

<form enctype="multipart/form-data" action="/4DCGI/actions/pro_form.a4d"
method="post" name="F43976N2" target="jqFormIO0">
<input type="hidden" value="F43976N2" name="WACformName"/>
<input type="hidden" value="000000D900001A23" name="WACformKey"/>
<input type="hidden" value="3" name="WACformAction"/>
<input type="hidden" value="000000D900000219" name="WACformSuccess"/>
<input type="hidden" value="#D000000D900001A57" name="WACformSUBMITTarget"/>
<input type="hidden" value="" name="WACformCancel"/>
<input type="hidden" value="" name="WACformCANCELTarget"/>
<input type="hidden" value="Photos" name="_Table"/>
<input type="hidden" value="000000D90000013C" name="_PhotosAnnonces"/>
<input type="hidden" value="" name="_PhotosPicture"/>
<input type="hidden" value="157E0D87206E1790" name="Sid"/>
<input type="text" name="F_A4D_Upload_name"/>
<input id="F43976N2_12" type="file" size="1" name="A4D_Upload" />
<input type="hidden" value="11111111111111" name="WACformChecks"/>
<input type="hidden" value="11111111111011" name="WACformReset"/>
<input type="submit" value="Submit" name="B_Submit"/>
</form>

Below the pro_form.a4d script :

<%
a4d.debug.dump form variables
write('''
<div id="content">

  <h1>File Upload Results</h1>
  
  <div class="a4d-debug">
  <table cellspacing="1">
    <tr>
      <td class="title" colspan="2">Uploads</td>
    </tr>
    <tr> 
      <th style="width: 120px;">Info</th>
      <th>Value</th>
    </tr>
    <tr> 
      <td style="width: 120px;">Error</td>
      <td>: `A4D_Error`</td>
    </tr>
    <tr> 
      <td style="width: 120px;">Number of uploads</td>
      <td>: `count uploads`</td>
    </tr>
    <tr> 
      <td style="width: 120px;">Remote filename</td>
      <td>: `get upload remote filename("A4D_Upload")`</td>
    </tr>
    <tr> 
      <td style="width: 120px;">Upload extension</td>
      <td>: `get upload extension("A4D_Upload")`</td>
    </tr>
    <tr> 
      <td style="width: 120px;">Content type</td>
      <td>: `get upload content type("A4D_Upload")`</td>
    </tr>
    <tr> 
      <td style="width: 120px;">Content encoding</td>
      <td>: `get upload encoding("A4D_Upload")`</td>
    </tr>
    <tr> 
      <td style="width: 120px;">Upload size</td>
      <td>: `get upload size("A4D_Upload")` bytes</td>
    </tr>
  </table>
</div>  
''')
end if 
%>

Below the result of the upload :

Form Variables
Key     Type     Value
A4D_Upload     Text     "; filename="4439-1.jpg" Content-Type: image/jpeg
... (binary content)"
B_Submit     Alpha(255)     "Submit"
F_A4D_Upload_name     Alpha(255)     "4439-1.jpg"
Sid     Alpha(255)     "AB58787BE086979A"
WACformAction     Alpha(255)     "3"
WACformCancel     Alpha(255)     ""
WACformCANCELTarget     Alpha(255)     ""
WACformChecks     Alpha(255)     "11111111111111"
WACformKey     Alpha(255)     "000000D900001A23"
WACformName     Alpha(255)     "F43976N2"
WACformReset     Alpha(255)     "11111111111011"
WACformSUBMITTarget     Alpha(255)     ""
WACformSuccess     Alpha(255)     "000000D900000219"
_PhotosAnnonces     Alpha(255)     "000000D90000013C"
_PhotosPicture     Alpha(255)     ""
_Table     Alpha(255)     "Photos"
File Upload Results
Uploads
Info     Value
Error     : 0
Number of uploads     : 0
Remote filename     :
Upload extension     :
Content type     :
Content encoding     :
Upload size     : -1 bytes

What else ?


-- 
Robert Ernens
HCTBA Consulting
[EMAIL PROTECTED]


_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to