+++ /dev/null
-package models
-
-import (
- "log"
- "os"
-
- "git.uzoombox.com/git/uzsdk/utils/osutil"
-)
-
-var (
- AppDir string // application directory
- CurDir string // current working directory
-)
-
-func init() {
- AppDir = osutil.GetAppDirectory()
-
- dir, err := os.Getwd()
- if err != nil {
- log.Fatal(err)
- }
- CurDir = dir
-}
import (
"compress/gzip"
"fmt"
- "path/filepath"
-
- "git.uzoombox.com/git/uzsdk/models"
)
// Configuration defines application's configuration.
if setting.Service.DataDirectory == "" {
setting.Service.DataDirectory = "/data/uzoombox/cloud"
}
- if filepath.Dir(setting.Service.DataDirectory) == "." {
- setting.Service.DataDirectory = filepath.Join(models.AppDir, setting.Service.DataDirectory)
- }
if len(setting.Service.TrustedProxies) == 0 {
setting.Service.TrustedProxies = append(setting.Service.TrustedProxies, "127.0.0.1")
}