Ajax File Upload - store outside public web tree

hdouglas

Member
I need to upload a number of files to a form, but be able to store them outside the public web tree. These are files (image/pdf) which for security reasons cannot be stored within the public web tree. I realise this will mean that the files cannot be displayed in lists/etc. that is not a problem in this instance.
 
You'd have to do that by steam. A PHP submission plugin, running onAfterProcess, which moves the file(s). The upload plugin was written with the (very) hard coded assumption that the upload folder is relative to the J! root.

And if doing the uploads with AJAX, you'd want some kind of garbage collecting cron script to remove anything that was uploaded, but the form was never submitted.

-- hugh
 
Thanks, will work that way. Good advice to additionally include a CRON script. Excellent Support, thanks.
Hugh
 
One gotcha to watch for will be file name clashes. We have an option to handle that ("keep original and increment name"), but that relies on the files being where we expect them to be. So you'll need to handle that yourself.

I would also suggest updating the table row Fabrik updated, to remove the path data, so Fabrik doesn't get its undies in a bundle expecting to find files which aren't there. Actually, given that this is Ajax uploading, which creates a separate table to store the one-to-many data, you'll probably want to remove the rows in that table entirely.

BTW, just a suggestion, but have you considered a private Amazon s3 bucket for this? I think you could achieve the desired results, but using S3 rather than local storage may not meet your requirements.
 
Thanks for the further info, the data being uploaded is highly sensitive, I don't think the client will favour a cloud based facility. The way the form operates, it is likely only to be called once with a range of files uploaded in a single submission. There is no requirement for a list of files anywhere, that is being picked up by a custom component once files have reached the secure area outside the public webtree.
Once again, many thanks for your help
Hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top