附件的数据库存储服务
默认情况下,附件都存储在共享的磁盘上,本服务可以将附件同时转储到数据库中;但由于数据库限制,文件大小最大不超过 4G。
开发环境下,为了便于团队开发,默认启用,并设置最大文件大小为 3M。
配置方式:bropen.framework.resource.attachment.storage.clazz = AttachmentDataService.name
bropen.framework.resource.attachment.storage.attachmentdata.maxlength = 4294967296 // 最大不超过 4G,开发环境默认 3M,超出则不保存到数据库中
| Modifiers | Name | Description |
|---|---|---|
static Long |
MAX_LENGTH_4G |
| Constructor and description |
|---|
AttachmentDataService
() |
| Type | Name and description |
|---|---|
Integer |
delete(List<String> saveNames, List<String> syncIds)删除转储的附件,并返回删除的附件数量 |
boolean |
exists(String saveName, String syncId) |
EncodedInputStreamWrapper |
getEncodedInputStream(javax.servlet.http.HttpServletRequest request, String saveName, String syncId) |
java.io.InputStream |
getInputStream(String saveName, String syncId) |
Long |
getLength(String saveName, String syncId, Long length) |
String |
getUrl(String saveName, String syncId, String fileName, Long length, String contentType, Date expiration) |
String |
save(String saveName, java.io.InputStream is, String fileName, Long length, String md5)附件转储 |
boolean |
shouldKeepLocalCopy(String fileName, Long length) |
| Methods inherited from class | Name |
|---|---|
class AbstractStorageService |
delete, deleteFailed, deleteRetry, exists, getEncodedInputStream, getInputStream, getLength, getUrl, isEnabled, save, setEnabled, shouldKeepLocalCopy, transfer |
class Object |
Object#wait(long, int), Object#wait(long), Object#wait(), Object#equals(Object), Object#toString(), Object#hashCode(), Object#getClass(), Object#notify(), Object#notifyAll() |
删除转储的附件,并返回删除的附件数量
附件转储
BROPEN Documentation, 2020-04-21 11:00