From fe514a350280f532921b644daee041f7d684343c Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 16 八月 2019 14:40:05 +0800
Subject: [PATCH] fix filePath

---
 WeedFSClient.go |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/WeedFSClient.go b/WeedFSClient.go
index a90f6f6..6556d1f 100644
--- a/WeedFSClient.go
+++ b/WeedFSClient.go
@@ -9,7 +9,6 @@
 	"log"
 	"mime/multipart"
 	"net/http"
-	"strings"
 	"time"
 )
 
@@ -64,12 +63,13 @@
 			return "", err
 		}
 		filePath := m["fileUrl"].(string)
-		if strings.Contains(filePath,"/"){
-			idx := strings.Index(filePath,"/")
-			filePath = filePath[idx+1:]
-			return filePath,nil
-		} else {
-			return "",errors.New("file upload error")
-		}
+		return filePath,nil
+		//if strings.Contains(filePath,"/"){
+		//	idx := strings.Index(filePath,"/")
+		//	filePath = filePath[idx+1:]
+		//	return filePath,nil
+		//} else {
+		//	return "",errors.New("file upload error")
+		//}
 	}
 }
\ No newline at end of file

--
Gitblit v1.8.0