Hi all,
I’ve just about had it up to my eyeballs with a file upload form application in scriptcase 8, and I’m looking for suggestions. Here’s what I’ve got:
I have a table, ss_files. It’s pretty straight forward, but here’s what the structure looks like:
There seems to be two methods for file upload in scriptcase –
[LIST=1]
I’ve tried this using both methods.
With method #1 I can get the file to upload to the database in the binary_data field, but I cannot figure out how to write an application to retrieve the file from the database afterward. This really does not break my heart, because the last thing I want is a bunch of file uploads bloating a table in my database and causing long-term havoc. Still, it’s frustrating to see the file there in the field with the proper byte size and have no way to access it other than using a third party utility like phpMyAdmin. I need a way for employees to access these files.
With method #2 I can get the file to upload to the /lib/tmp folder, but Scriptcase modifies the file name to be something like sc#######[Filename.ext]. It ignores my directive to create subfolders using the variables. It always puts the file in /_lib/tmp instead of moving the file to /vault/{customer_id}/{module_id}/{reference_id} as requested. It does not populate the “file_name” field in the database. It makes the entire table seem pointless for tracking what files have been uploaded and where they reside.
Am I missing some key detail here? I’ve watched the video tutorial on this, which did not answer any questions for me. I’ve searched through the help documentation, which is similarly unhelpful. I’ve searched the forums but not found my exact problem, detailed above. I’ve tried it in a development environment and also deployed out to a QA environment with no major change. I was even hoping to look through the provided ScriptCase Ticketing system sample application for how they were managing file uploads, but it seems that when I upgraded to SC8, this ticketing sample app was broken and does not compile any longer.
Any help would be appreciated!