# lsnu-study-online-file-server **Repository Path**: mzy1998/lsnu-study-online-file-server ## Basic Information - **Project Name**: lsnu-study-online-file-server - **Description**: 文件服务器:基于SpringBoot - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-12-16 - **Last Updated**: 2020-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # about my file-server - [TOC] ## 技术以及实现细节 *使用springboot,以及springboot默认的调度事件搭建的文件服务器,以时间[day]为单位创建目录,分别存放:语音,视频以及图片...[可更多]的轻量文件服务器* 定义每次只能单文件上传: 提供两种方式 ### (1)两个请求头,一个参数 这样的话,请求的时候数据域只有文件,最舒服合理。 ```java // url:http://xxx:10086/upload/two-params // 此种方式上传的时候,需要两个参数,一个header(此种方式也是默认的可以直接/upload访问) // url:http://xxx:10086/upload ``` 自定义headers | 名称 | 类型 | | ------------- | ----------------------------------------- | | Authorization | String(上传身份认证的字段) | | Type | String(文件类型:voice、video或者image) | 参数param | 名称 | 类型 | | ---- | ------------------ | | file | stream(流的形式) | ### (2)一个请求头,两个参数 以下区别把type作为了参数。 ```java // url:http://xxx:10086/upload/two-headers // 此种方式上传的时候,需要一个参数,两个header ``` 自定义header | 名称 | 类型 | | ------------- | ---------------------------- | | Authorization | String(上传身份认证的字段) | 参数params | 名称 | 类型 | | ---- | ----------------------------------------- | | file | stream(流的形式) | | Type | String(文件类型:voice、video或者image) | ```html