Thanks Jako but perhaps I didn't clarify my issue enough:
If i edit two separate resources and upload an image in the first, when I go to edit the second, the image uploaded in the first resource is still in the cache and is displayed in the second resource.
The Problem: Unless I manually remove the image using the minus icon, it gets uploaded into my second resource.
So how would I clear any cached items in the upload form every time a user edits a resource?
In the interim I've hacked it with the following JS which I'm calling after the page is rendered:
Quote from: Jako at Apr 02, 2014, 12:05 AM
var imgholder = $('#file-uploader-photos').find('.delete-button');
If you don't want to submit any images by the form, you just don't have to call the AjaxUpload2Formit hook and call AjaxUpload->clearCache(3600) + AjaxUpload->clearValue() after validation in an own hook. clearCache(0) would delete cached files from other users too, so don't set it that short.
[ed. note: hyponym last edited this post 7 years, 6 months ago.]