use of net.jforum.view.forum.common.UploadUtils in project jforum2 by rafaelsteil.
the class SmiliesAction method processUpload.
private String processUpload() {
String imgName = "";
if (this.request.getObjectParameter("smilie_img") != null) {
FileItem item = (FileItem) this.request.getObjectParameter("smilie_img");
UploadUtils uploadUtils = new UploadUtils(item);
imgName = MD5.crypt(item.getName());
uploadUtils.saveUploadedFile(SystemGlobals.getApplicationPath() + "/" + SystemGlobals.getValue(ConfigKeys.SMILIE_IMAGE_DIR) + "/" + imgName + "." + uploadUtils.getExtension());
imgName += "." + uploadUtils.getExtension();
}
return imgName;
}
Aggregations