Refine the directory structure of this project.
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"tank/rest/result"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -137,7 +138,7 @@ func (this *AlienController) CheckRequestUser(writer http.ResponseWriter, reques
|
||||
}
|
||||
|
||||
//系统中的用户x要获取一个UploadToken,用于提供给x信任的用户上传文件。
|
||||
func (this *AlienController) FetchUploadToken(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *AlienController) FetchUploadToken(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
//文件名。
|
||||
filename := request.FormValue("filename")
|
||||
@ -219,7 +220,7 @@ func (this *AlienController) FetchUploadToken(writer http.ResponseWriter, reques
|
||||
}
|
||||
|
||||
//系统中的用户x 拿着某个文件的uuid来确认是否其信任的用户已经上传好了。
|
||||
func (this *AlienController) Confirm(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *AlienController) Confirm(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
matterUuid := request.FormValue("matterUuid")
|
||||
if matterUuid == "" {
|
||||
@ -237,7 +238,7 @@ func (this *AlienController) Confirm(writer http.ResponseWriter, request *http.R
|
||||
}
|
||||
|
||||
//系统中的用户x 信任的用户上传文件。这个接口需要支持跨域。
|
||||
func (this *AlienController) Upload(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *AlienController) Upload(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
//允许跨域请求。
|
||||
this.allowCORS(writer)
|
||||
if request.Method == "OPTIONS" {
|
||||
@ -288,7 +289,7 @@ func (this *AlienController) Upload(writer http.ResponseWriter, request *http.Re
|
||||
}
|
||||
|
||||
//给一个指定的url,从该url中去拉取文件回来。此处采用uploadToken的模式。
|
||||
func (this *AlienController) CrawlToken(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *AlienController) CrawlToken(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
//允许跨域请求。
|
||||
this.allowCORS(writer)
|
||||
if request.Method == "OPTIONS" {
|
||||
@ -336,7 +337,7 @@ func (this *AlienController) CrawlToken(writer http.ResponseWriter, request *htt
|
||||
}
|
||||
|
||||
//通过一个url直接上传,无需借助uploadToken.
|
||||
func (this *AlienController) CrawlDirect(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *AlienController) CrawlDirect(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
//文件名。
|
||||
filename := request.FormValue("filename")
|
||||
@ -377,7 +378,7 @@ func (this *AlienController) CrawlDirect(writer http.ResponseWriter, request *ht
|
||||
}
|
||||
|
||||
//系统中的用户x要获取一个DownloadToken,用于提供给x信任的用户下载文件。
|
||||
func (this *AlienController) FetchDownloadToken(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *AlienController) FetchDownloadToken(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
matterUuid := request.FormValue("matterUuid")
|
||||
if matterUuid == "" {
|
||||
|
Reference in New Issue
Block a user