Aug 21st, 2009, 7:33 PM
Hey Nomad,
Regarding #1, no, you won't be able to store binary data in the database... at least I very much doubt it. Form Tools fields are text-based (MEDIUMTEXT, VARCHARS) and binary data should be stored in BLOBs. What I'd do instead is this:
1. save the file directly to a folder somewhere,
2. store the unique filename in the POST request and pass THAT to Form Tools
Unfortunately I don't think you'll be then able to attach the file to the email as an attachment... which leads us to your #2. Tricky!
Hmm.
How high a volume of form submissions are you expecting? One hack would be to always create the file with a specific filename, e.g. "myfile.pdf", and be sure to delete it when creating a new one. Then in your email template, always reference that specific filename by including it as an attachment.
Not great....
- Ben
Regarding #1, no, you won't be able to store binary data in the database... at least I very much doubt it. Form Tools fields are text-based (MEDIUMTEXT, VARCHARS) and binary data should be stored in BLOBs. What I'd do instead is this:
1. save the file directly to a folder somewhere,
2. store the unique filename in the POST request and pass THAT to Form Tools
Unfortunately I don't think you'll be then able to attach the file to the email as an attachment... which leads us to your #2. Tricky!
Hmm.
How high a volume of form submissions are you expecting? One hack would be to always create the file with a specific filename, e.g. "myfile.pdf", and be sure to delete it when creating a new one. Then in your email template, always reference that specific filename by including it as an attachment.
Not great....
- Ben