Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Walter.Wen
SpringBootFileUploadDownload
提交
19c42580
S
SpringBootFileUploadDownload
项目概览
Walter.Wen
/
SpringBootFileUploadDownload
通知
5
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SpringBootFileUploadDownload
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
19c42580
编写于
3月 23, 2020
作者:
W
wenguang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码完善
上级
b296d7fb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
42 addition
and
11 deletion
+42
-11
.idea/inspectionProfiles/Project_Default.xml
.idea/inspectionProfiles/Project_Default.xml
+36
-0
src/main/java/com/we/config/WebMvcConfig.java
src/main/java/com/we/config/WebMvcConfig.java
+1
-0
src/main/java/com/we/controller/PhotographController.java
src/main/java/com/we/controller/PhotographController.java
+4
-9
src/main/resources/templates/fileoperation/multifile.html
src/main/resources/templates/fileoperation/multifile.html
+1
-2
未找到文件。
.idea/inspectionProfiles/Project_Default.xml
0 → 100644
浏览文件 @
19c42580
<component
name=
"InspectionProjectProfileManager"
>
<profile
version=
"1.0"
>
<option
name=
"myName"
value=
"Project Default"
/>
<inspection_tool
class=
"JavaDoc"
enabled=
"true"
level=
"WARNING"
enabled_by_default=
"true"
>
<option
name=
"TOP_LEVEL_CLASS_OPTIONS"
>
<value>
<option
name=
"ACCESS_JAVADOC_REQUIRED_FOR"
value=
"none"
/>
<option
name=
"REQUIRED_TAGS"
value=
""
/>
</value>
</option>
<option
name=
"INNER_CLASS_OPTIONS"
>
<value>
<option
name=
"ACCESS_JAVADOC_REQUIRED_FOR"
value=
"none"
/>
<option
name=
"REQUIRED_TAGS"
value=
""
/>
</value>
</option>
<option
name=
"METHOD_OPTIONS"
>
<value>
<option
name=
"ACCESS_JAVADOC_REQUIRED_FOR"
value=
"none"
/>
<option
name=
"REQUIRED_TAGS"
value=
"@return@param@throws or @exception"
/>
</value>
</option>
<option
name=
"FIELD_OPTIONS"
>
<value>
<option
name=
"ACCESS_JAVADOC_REQUIRED_FOR"
value=
"none"
/>
<option
name=
"REQUIRED_TAGS"
value=
""
/>
</value>
</option>
<option
name=
"IGNORE_DEPRECATED"
value=
"false"
/>
<option
name=
"IGNORE_JAVADOC_PERIOD"
value=
"true"
/>
<option
name=
"IGNORE_DUPLICATED_THROWS"
value=
"false"
/>
<option
name=
"IGNORE_POINT_TO_ITSELF"
value=
"false"
/>
<option
name=
"myAdditionalJavadocTags"
value=
"date"
/>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
src/main/java/com/we/config/WebMvcConfig.java
浏览文件 @
19c42580
...
...
@@ -10,4 +10,5 @@ public class WebMvcConfig extends WebMvcConfigurationSupport {
protected
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
registry
.
addResourceHandler
(
"/static/**"
).
addResourceLocations
(
"classpath:/static/"
);
}
}
src/main/java/com/we/controller/PhotographController.java
浏览文件 @
19c42580
...
...
@@ -5,17 +5,10 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
sun.misc.BASE64Decoder
;
import
sun.text.resources.FormatData
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.text.DateFormat
;
import
java.text.Format
;
import
java.util.Date
;
@Controller
@RequestMapping
(
"/photograph"
)
...
...
@@ -37,7 +30,8 @@ public class PhotographController {
@RequestMapping
(
"/photoUpload"
)
@ResponseBody
public
int
fileUpload
(
@RequestParam
(
"op"
)
String
op
,
@RequestParam
(
"base64url"
)
String
base64url
)
{
if
(!
"takePhoto"
.
equals
(
op
))
{
String
opStr
=
"takePhoto"
;
if
(!
opStr
.
equals
(
op
))
{
return
-
1
;
}
BASE64Decoder
decoder
=
new
BASE64Decoder
();
...
...
@@ -46,7 +40,8 @@ public class PhotographController {
// Base64解码
byte
[]
b
=
decoder
.
decodeBuffer
(
baseurl
);
for
(
int
i
=
0
;
i
<
b
.
length
;
++
i
)
{
if
(
b
[
i
]
<
0
)
{
// 调整异常数据
// 调整异常数据
if
(
b
[
i
]
<
0
)
{
b
[
i
]
+=
256
;
}
}
...
...
src/main/resources/templates/fileoperation/multifile.html
浏览文件 @
19c42580
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:sec=
"http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
/>
<title>
Insert title here
</title>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录