This commit is contained in:
Chris Lu
2020-03-07 06:12:57 -08:00
parent 564629444b
commit 1ae83c2938
7 changed files with 35 additions and 28 deletions

View File

@@ -48,7 +48,6 @@ func (n *Needle) String() (str string) {
return
}
func CreateNeedleFromRequest(r *http.Request, fixJpgOrientation bool, sizeLimit int64) (n *Needle, originalSize int, e error) {
n = new(Needle)
pu, e := ParseUpload(r, sizeLimit)
@@ -60,7 +59,6 @@ func CreateNeedleFromRequest(r *http.Request, fixJpgOrientation bool, sizeLimit
n.LastModified = pu.ModifiedTime
n.Ttl = pu.Ttl
if len(pu.FileName) < 256 {
n.Name = []byte(pu.FileName)
n.SetHasName()