The image (binary) data needs to be captured and sent to TS using multipart 
form encoding (same as the kind of form you need when there's a file input 
present) There are JS tools that can do this for you.



In TS you can access the binary data of the image just like any other argument 
(with @ARG etc). We added @POSTARGFILENAME so that you could get the filename 
from the embedded binary part as well – if present.



Don't do anything with the argument data except write it to a file or save it 
into a the database. If you try to manipulate it. Writing to a file is straight 
forward. Writing to the database requires a bind. Either use an Insert/Update 
action or @BIND in a DBMS.



Your database column type should be binary aka BLOB  - you can use any 
character types (text, varchar, clob, etc). Image is an outdated alias for 
binary.



Note that it's usually preferential to store binary on disk and store the 
reference (filename, path, url) in the database. Binary tends to be large and 
have no intrinsic properties useful to a database.



Good luck,



Robert



From: Steve Fogelson [mailto:st...@upnorthsports.com]
Sent: Thursday, July 13, 2023 12:39 PM
To: TeraScript-Talk@terascript.com
Subject: TeraScript-Talk: Help Desk App



I am building a simple help desk application using TeraScript.



I have a field that I would like to include text as well as image snippets. I 
generate the image snippets by using Microsoft’s Snipping Tool. I normally can 
copy these snippets to word docs, email, notepad, etc.



Here is a sample:





I tried copying this snippet, as well as text, into a field in my TeraScript 
taf. I have used MySQL datatypes of TEXT and LONGBLOB. Only the text redisplays 
after saving the DB record. No snippet.



Am I barking up a tree or is there a way to do this using TeraScript and MySQL?



Thanks for your help.



Steve Fogelson

Internet Commerce Solutions



  _____

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