On Oct 4, 2005, at 11:41 AM, Steve Alex wrote:
have following code snippet from a test file:
<%
if(form variables has("upload"))
$aa := count uploads
$ab := blob size(a4d_update)
//$ac := get upload size(a4d_upload)
dump locals
dump form variables
end if
%>
<form name="form" action="http://mysite/4dcgi/tdbimport.a4d"
method="post" ENCTYPE="multipart/form-data">
<input type="file" name="A4D_Upload">
<input type="submit" name="upload" value="Upload">
</form>
Hit choose file button and locate file - okay
Hit update/submit button
$aa reports 1 file
$ab report blob size of zero (guess already cleared out)
$ac, after removing comment, errors out with Expecting a text
expression pointing to A4D_Upload
Steve,
A couple of things to note about your code:
$ab is referencing a4d_update. Shouldn't it be referencing a4d_upload?
Shouldn't get upload size use a text type? So it would be: get upload
size("a4d_upload")
Here's some code I wrote for uploads that may be of use to you. I had
problems until I used the get root function when copying the upload.
if($val_error=0)
create_keywords
if(count uploads = 1)
$ext := get upload extension("A4D_Upload")
if(($ext # ".a4d") & ($ext # ".a4p"))
$file_name := substring([person]last_name;1;17)
+ "_" + string(session{"sr_recNum"};"00000")
$file_path := "files/" + $file_name + $ext
[person]file_path := $file_path
copy upload("A4D_Upload";get root + $file_path)
end if
end if
Warmest regards,
Rick Hazey
bitworx, inc.
---------------------------
[EMAIL PROTECTED]
http://www.bitworx.com
---------------------------
11924 Sunray Ave. Suite B
Baton Rouge, LA 70816
(225) 293-1333 Voice
(225) 293-1330 FAX
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/