String policy = applet.getParameter("upload-policy");
CustomLog.log("selected policy is :" + policy);
if (policy != null && policy.equals("file")) {
FileUploadPolicy fup = new FileUploadPolicy(this);
this.map.put("global.policy", fup);
} else if (policy != null && policy.equals("original-image")) {
OriginalImageUploadPolicy oiup = new OriginalImageUploadPolicy(this);
this.map.put("global.policy", oiup);
} else /* in all other cases we will user image upload policy */ {