Sep 17
Jerad Hoff Uploading files while adding records
Sep 17, 2014; 22:11
Jerad Hoff
Uploading files while adding records
Greetings everyone,
I=92ve created a simple form that includes the ability to upload documents along with adding the form data to a record:
<form action="test_response.lasso" method="post" enctype="multipart/form-data=94>
Select a file: <input type="file" name="upload" value="">
Test Field 1:</TD><TD ALIGN="LEFT"><INPUT TYPE="TEXT" NAME==93TEST1" SIZE="40">
<input type="submit" value="Upload File">
</form>
For the response page, I have this:
[INLINE:
-database==93MyDB",
-table==93TheTable",
(Action_Params),
-keyField==91ID',
-add]
DB ADD:[ERROR_CURRENTERROR]
[/INLINE]
[IF: (File_Uploads->Size) > 0]
[INLINE: -username==91user1', -password==91foobar', -nothing]
[File_ProcessUploads: -Destination='uploads/', -FileOverwrite]
FILE ADD: [FILE_CURRENTERROR]
[/INLINE]
[/IF]
This works great, but only if a file is submitted with the form. If no file is uploaded, I get an error that the field =91Upload=92 isn=92t in the field list for the DB. The easy fix is to create a field named Upload and add it to the table, but I figure there=92s a more elegant solution than that.
Any ideas would be appreciated!
Thanks,
- Jerad
#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Sep 18
Rick Draper RE: Uploading files while adding records
Sep 18, 2014; 16:05
Rick Draper
RE: Uploading files while adding records
Sep 17
Steve Piercy - Website Builder Re: Uploading files while adding records
Sep 17, 2014; 23:46
Steve Piercy - Website Builder
Re: Uploading files while adding records
Sep 19
Jerad Hoff Re: Uploading files while adding records
Sep 19, 2014; 02:12
Jerad Hoff
Re: Uploading files while adding records
Sep 19
Rick Draper RE: Uploading files while adding records
Sep 19, 2014; 19:49
Rick Draper
RE: Uploading files while adding records
Sep 19
Steve Piercy - Website Builder Re: Uploading files while adding records
Sep 19, 2014; 02:51
Steve Piercy - Website Builder
Re: Uploading files while adding records
Sep 20
Jerad Hoff Re: Uploading files while adding records
Sep 20, 2014; 01:46
Jerad Hoff
Re: Uploading files while adding records
Sep 20
Jerad Hoff Re: Uploading files while adding records
Sep 20, 2014; 01:47
Jerad Hoff
Re: Uploading files while adding records
Sep 20
Steve Piercy - Website Builder Re: Uploading files while adding records
Sep 20, 2014; 04:23
Steve Piercy - Website Builder
Re: Uploading files while adding records
Sep 21
Jerad Hoff Re: Uploading files while adding records
Sep 21, 2014; 00:07
Jerad Hoff
Re: Uploading files while adding records
Sep 21
Rick Draper RE: Uploading files while adding records
Sep 21, 2014; 17:31
Rick Draper
RE: Uploading files while adding records
Sep 21
Steve Piercy - Website Builder RE: Uploading files while adding records
Sep 21, 2014; 02:33
Steve Piercy - Website Builder
RE: Uploading files while adding records