Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b943e887d | ||
|
|
6b2841274d | ||
|
|
d5ccfbb231 | ||
|
|
359eac8985 | ||
|
|
96750730d3 | ||
|
|
725503152e |
@@ -11,7 +11,7 @@
|
||||
|
||||
<groupId>com.imyeyu.timiserverapi</groupId>
|
||||
<artifactId>TimiServerAPI</artifactId>
|
||||
<version>1.0.72</version>
|
||||
<version>1.0.74</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>TimiServerAPI</name>
|
||||
<description>imyeyu.com API</description>
|
||||
|
||||
@@ -461,7 +461,7 @@ public class AppVersionService {
|
||||
if (release.getStatus() == AppRelease.Status.PUBLISHED) {
|
||||
throw new IllegalArgumentException("已发布的版本不能删除,请先撤回");
|
||||
}
|
||||
releaseMapper.destroy(releaseId);
|
||||
releaseMapper.delete(releaseId);
|
||||
log("APP_RELEASE_DELETE", releaseId);
|
||||
}
|
||||
|
||||
|
||||
@@ -260,7 +260,9 @@ public class AttachmentController {
|
||||
}
|
||||
|
||||
private void setDownloadHeader(Attachment attachment) throws UnsupportedEncodingException {
|
||||
if (attachment != null && TimiSpring.getRequest().getRequestURI().endsWith("/download") && attachment.getName() != null) {
|
||||
// 路径带 /download 就强制下载:/download/{id} 的结尾是 id,用 endsWith 匹配不到
|
||||
boolean download = TimiSpring.getRequest().getRequestURI().contains("/download");
|
||||
if (attachment != null && download && attachment.getName() != null) {
|
||||
TimiSpring.getResponse().setHeader("Content-Disposition", Network.getFileDownloadHeader(attachment.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user