上传文件返回格式为application/json

This commit is contained in:
hui
2025-01-14 17:09:30 +08:00
parent 14d1a2e385
commit 87eeea4874

View File

@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@@ -282,7 +283,7 @@ public class XFileBaseApi extends ApiBaseController{
}
@ApiAccess(path="xfile.file.upload")
@RequestMapping(value="/file/upload", method={RequestMethod.POST})
@RequestMapping(value="/file/upload", method={RequestMethod.POST},produces = "application/json")
public JsonResponse<ListViewItem> fileUpload(HttpServletRequest request,String folderId) {
if(StringUtils.isBlank(folderId)) {
folderId="0";