@At
@GET
@Ok("raw")
public Object downloadApk(){
return fileService.latestVersionApk();
这种情况有没有哪儿需要注意的地方啊
@At
@GET
@Ok("raw")
public Object downloadApk(){
return fileService.latestVersionApk();
这种情况有没有哪儿需要注意的地方啊
嗯
public File latestVersionApk(){
ApkVersion apkVersion=apkVersionService.fechNewestApkversion();
String apkpath=conf.get("apkpath")+apkVersion.getVersionName()+".apk";
File apk=new File(apkpath);
return apk;
}
浏览器输入地址能正常下载,apk里面就不得行。文件名这些app里面都获取到了,但是文件大小就是不对。
X-Powered-By: nutz/1.r.69.20210929 <nutzam.com>
I/XHttp: Content-Disposition: attachment; filename="app-release-1.0.3.apk"
I/XHttp: Content-Type: text/plain;charset=UTF-8
I/XHttp: Content-Length: 15519820
I/XHttp: Date: Thu, 31 Mar 2022 08:12:00 GMT
I/XHttp: Keep-Alive: timeout=20
I/XHttp: Connection: keep-alive
I/XHttp: Cache-Control: no-cache