Good evening,
I’ve got a form that captures information and emails it out which is working fine. I’ve added to that form, a new field in the database (of type ‘text’) for adding a document attachment. Scriptcase field type is “document (file name)” so that just the file name is stored in the database and the file saved in Scriptcase’s default document path. When I add the document (via browse or drag and drop) it all appears to work fine, but when I click on the final button to add the record to the database, I get:
Fatal error: Uncaught exception ‘Swift_IoException’ with message ‘Unable to open file for reading [/home/user/NetMake/v81/wwwroot/scriptcase/file/doc/test.txt]’
I think I’ve figured out the reason it can’t read that file is because it’s not there!?? In main Settings, my document path is the usual /home/user/NetMake/v81/wwwroot/scriptcase/file/doc but nothing is being saved there. If I manually save the test.txt to the /home/user/NetMake/v81/wwwroot/scriptcase/file/doc path and run my form again (attaching the same named file), it works fine - email goes out with the correct attachment. But if I try to add a new file (that doesn’t already exist in the doc directory, I get the same error as listed above.
Anyone have any idea what I could have done wrong? I’ve done this numerous times in the past and don’t remember ever having to do anything other than select the field type in Scriptcase to be “document (file name)” and then any uploaded document is automatically saved in that location, and the file name is saved in the database field.
I’m running the latest Scriptcase version on Ubuntu 16.04. I checked permissions and even set them to 777 but still the same issues. Documents added to a form’s “document (file name)” field don’t get uploaded at all…and no errors thrown related to them not being able to be saved to the /home/user/NetMake/v81/wwwroot/scriptcase/file/doc/ path
Thanks very much in advance for any directives / suggestions.
EDIT: For kicks, did a search for test.txt and there are a bunch of oddly named files in /home/user/NetMake/v81/wwwroot/scriptcase/tmp that seem to be my test file, but nothing in the /home/user/NetMake/v81/wwwroot/scriptcase/file/doc/ directory still… confused.