public class FileUploadUtil
extends java.lang.Object
构造器和说明 |
---|
FileUploadUtil() |
限定符和类型 | 方法和说明 |
---|---|
static org.springframework.web.servlet.ModelAndView |
downLoadStream(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.InputStream in)
对输入流直接下载
例如对需要导出的数据组织成输入流,对该流直接下载。
|
static org.springframework.web.servlet.ModelAndView |
downLoadStream(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.InputStream in,
java.lang.String fileName)
对输入流直接下载
例如对需要导出的数据组织成输入流,对该流直接下载。
|
static java.lang.String |
escapeFileName(V3XFile file)
手机端下载中文附件出现乱码,用于将文件转化成英文和字母的格式。
|
static com.seeyon.ctp.common.file.model.CtpFile |
getFile(javax.servlet.http.HttpServletRequest request)
获取上传文件的文件句柄
使用附件上传组件上传需要的文件(例如,模板文件或要导入的数据文件),
上传后直接获取该文件,而不是返回附件列表页面。
|
static java.io.InputStream |
getInputStream(javax.servlet.http.HttpServletRequest request)
获取上传文件的输入流
使用附件上传组件上传需要的文件(例如,模板文件或要导入的数据文件),
上传后直接获取该文件,而不是返回附件列表页面。
|
static java.lang.String |
getOfficeHeader(java.lang.String type) |
static java.lang.String |
getOfficeName(java.lang.Long file,
java.lang.String type) |
static java.lang.String |
getOfficeSuffix(java.lang.String type) |
static java.lang.String |
imageUrl2Rest(java.lang.String content)
已过时。
|
static java.lang.String |
url2Rest(java.lang.String content)
将正文中的spring mvc的url替换为rest url,便于小程序和移动控制URL过滤。
|
public static java.lang.String escapeFileName(V3XFile file)
file
- public static java.lang.String getOfficeHeader(java.lang.String type)
public static java.lang.String getOfficeSuffix(java.lang.String type)
public static java.lang.String getOfficeName(java.lang.Long file, java.lang.String type)
public static com.seeyon.ctp.common.file.model.CtpFile getFile(javax.servlet.http.HttpServletRequest request) throws BusinessException
request
- BusinessException
public static java.io.InputStream getInputStream(javax.servlet.http.HttpServletRequest request) throws BusinessException
request
- BusinessException
public static org.springframework.web.servlet.ModelAndView downLoadStream(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.InputStream in, java.lang.String fileName) throws BusinessException
request
- response
- in
- 输入流fileName
- 文件名BusinessException
public static org.springframework.web.servlet.ModelAndView downLoadStream(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.InputStream in) throws BusinessException
request
- response
- in
- BusinessException
@Deprecated public static java.lang.String imageUrl2Rest(java.lang.String content)
public static java.lang.String url2Rest(java.lang.String content)
content
- 正文