forked from neil/plugin-external-background
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
967 B
31 lines
967 B
package com.fr.plugin.external.web; |
|
|
|
import com.fr.data.NetworkHelper; |
|
import com.fr.json.JSONObject; |
|
import com.fr.plugin.external.ImageManager; |
|
import com.fr.stable.fun.impl.AbstractRequestInterceptor; |
|
import com.fr.web.utils.WebUtils; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
public class DeleteImageAction extends AbstractRequestInterceptor { |
|
|
|
@Override |
|
public String getCMD() { |
|
return "del"; |
|
} |
|
|
|
@Override |
|
public void actionCMD(HttpServletRequest req, HttpServletResponse res) throws Exception { |
|
actionCMD(req, res, null); |
|
} |
|
|
|
@Override |
|
public void actionCMD(HttpServletRequest req, HttpServletResponse res, String sessionID) throws Exception { |
|
String id = NetworkHelper.getHTTPRequestParameter(req, "imageid"); |
|
ImageManager.getInstance().removeImage(id); |
|
WebUtils.printAsJSON(res, JSONObject.create().put("result", "success")); |
|
} |
|
|
|
}
|
|
|