feat: support output
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"exporter/config"
|
||||
"exporter/database/telegram_resource/public/model"
|
||||
"exporter/database/telegram_resource/public/table"
|
||||
|
||||
@@ -38,7 +39,8 @@ 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, strings.Trim(ext, "."))
|
||||
assetFile := fmt.Sprintf("%d/%d.%s", c.UUID, assetID, strings.Trim(ext, "."))
|
||||
assetFile = filepath.Join(config.C.Outputs, assetFile)
|
||||
|
||||
// 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