|
|
@ -9,6 +9,7 @@ import ( |
|
|
|
"mime" |
|
|
|
"net/http" |
|
|
|
"os" |
|
|
|
"path/filepath" |
|
|
|
"runtime" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
@ -268,7 +269,7 @@ func parseURLPath(path string) (vid, fid, filename, ext string) { |
|
|
|
if strings.Count(path, "/") == 3 { |
|
|
|
parts := strings.Split(path, "/") |
|
|
|
vid, fid, filename = parts[1], parts[2], parts[3] |
|
|
|
ext = filename[strings.LastIndex(filename, "."):] |
|
|
|
ext = filepath.Ext(filename) |
|
|
|
} else { |
|
|
|
sepIndex := strings.LastIndex(path, "/") |
|
|
|
commaIndex := strings.LastIndex(path[sepIndex:], ",") |
|
|
|