fix: issues
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"exporter/database/telegram_resource/public/model"
|
||||
@@ -37,7 +38,7 @@ func NewDBChannel(uuid int64, username, title string) *DBChannel {
|
||||
}
|
||||
|
||||
func (c *DBChannel) Asset(assetID int64, ext string) string {
|
||||
assetFile := fmt.Sprintf("outputs/%d/%d.%s", c.UUID, assetID, ext)
|
||||
assetFile := fmt.Sprintf("outputs/%d/%d.%s", c.UUID, assetID, strings.Trim(ext, "."))
|
||||
|
||||
// if file dir not exists then create it
|
||||
if _, err := os.Stat(filepath.Dir(assetFile)); os.IsNotExist(err) {
|
||||
|
||||
Reference in New Issue
Block a user