[change] importer
This commit is contained in:
parent
db341092b2
commit
67e4581f11
1 changed files with 5 additions and 4 deletions
|
|
@ -59,10 +59,11 @@ func Open(name string) from.Source {
|
||||||
ext := strings.ToLower(strings.TrimPrefix(filepath.Ext(name), "."))
|
ext := strings.ToLower(strings.TrimPrefix(filepath.Ext(name), "."))
|
||||||
switch ext {
|
switch ext {
|
||||||
case "xlsx":
|
case "xlsx":
|
||||||
fullpath := name
|
// fullpath := name
|
||||||
if !strings.HasPrefix(fullpath, "/") {
|
fullpath := filepath.Join(xfs.Stor.Root, name)
|
||||||
fullpath = filepath.Join(xfs.Stor.Root, name)
|
// if !strings.HasPrefix(fullpath, "/") {
|
||||||
}
|
// fullpath = filepath.Join(xfs.Stor.Root, name)
|
||||||
|
// }
|
||||||
return xlsx.Open(fullpath)
|
return xlsx.Open(fullpath)
|
||||||
}
|
}
|
||||||
exception.New("暂不支持: %s 文件导入", 400, ext).Throw()
|
exception.New("暂不支持: %s 文件导入", 400, ext).Throw()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue