Andrej,


This should work – but be sure to not handle the data at all and use a 
directDBMS with the @BIND tag.



So:



<@ASSIGN binaryData <@ARG file>>



Then in a DirectDBMS:



INSERT INTO files (data) VALUES (<@BIND binaryData>)



notes about TS6:



It’s a 32-bit app, so you’re limited on memory usage. TS7 is 64-bit.

TS 7.1.1 added @POSTARGFILENAME which is a convenient way to get the original 
filename from a <input type=file>.

TS6 is unsupported.



Because of these items, I would recommend upgrading to TS7. There won’t be any 
code changes, there’s better performance and several other improvements. And if 
you hit any issues, I can provide support.



Robert



From: Andrej Popovic [mailto:and...@workflowengine.co.uk]
Sent: Wednesday, May 02, 2018 5:05 AM
To: TeraScript-Talk@terascript.com
Subject: TeraScript-Talk: Handling VARBINARY(MAX)



Hi all



I am looking at a requirement to add the ability to upload binary files into a 
SQL Server database - varbinary(MAX) - fronted by a TeraScript web. This is 
using a plain old <input type=”file”> in a HTML form.



I have done this without too many problems in .NET before, but I am a little 
concerned about the ability of TeraScript to handle a file upload POSTARG in 
the order of 10MB or more, and embed it successfully in an Insert, Update or 
Direct DBMS action.



The client is using TeraScript 6.2.7 on Windows IIS and RAM is plentiful 
(64-bit machine).



Is it feasible, and if so, what are the gotchas?



Regards

Andrej



Andrej Popovic
Workflow Engine Ltd
Suite 72, 2 Lansdowne Crescent

Bournemouth BH1 1SA

 <http://www.workflowengine.co.uk/> http://www.workflowengine.co.uk
 <mailto:and...@workflowengine.co.uk> and...@workflowengine.co.uk
Support 24/7: 08432 898501



This e-mail and any files transmitted with it are confidential and are solely 
for the use of the addressee(s). Opinions expressed in this email are those of 
the writer and not necessarily the company. E-mail traffic is monitored within 
Workflow Engine Ltd, and messages may be viewed. If you are not the intended 
recipient, any reading, printing, storage, disclosure to another person, 
copying or any other action taken in respect of this e-mail is prohibited and 
may be unlawful. If you are not the intended recipient, please notify the 
sender immediately by using the reply function and then permanently delete the 
email from your inbox. Calls to 08432 898501 will cost 7p per a minute, your 
telephone provider (including mobile providers) may add an additional access 
charge.





  _____

To unsubscribe from this list, please send an email to lists...@terascript.com 
<mailto:lists...@terascript.com>  with "unsubscribe terascript-talk" in the 
body.




----------------------------------------

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.

Reply via email to