mirror of
https://github.com/celogeek/piwigo-cli.git
synced 2025-05-25 02:02:37 +02:00
fix upload tree
This commit is contained in:
parent
95f3963579
commit
31441a3e3c
@ -81,7 +81,6 @@ func (p *Piwigo) Upload(file *piwigotools.FileToUpload, stat *piwigotools.FileTo
|
||||
data.Set("original_filename", file.Name)
|
||||
data.Set("check_uniqueness", "true")
|
||||
if file.CreatedAt() != nil {
|
||||
fmt.Println(file.CreatedAt())
|
||||
data.Set("date_creation", file.CreatedAt().String())
|
||||
}
|
||||
if file.CategoryId > 0 {
|
||||
|
@ -58,7 +58,6 @@ func (f *FileToUpload) Info() *FileInfo {
|
||||
|
||||
info := FileInfo{
|
||||
size: st.Size(),
|
||||
ext: strings.ToLower(filepath.Ext(f.Name)[1:]),
|
||||
md5: checksum,
|
||||
createdAt: f.exifCreatedAt(),
|
||||
}
|
||||
@ -86,10 +85,7 @@ func (f *FileToUpload) Size() int64 {
|
||||
}
|
||||
|
||||
func (f *FileToUpload) Ext() string {
|
||||
if info := f.Info(); info != nil {
|
||||
return info.ext
|
||||
}
|
||||
return ""
|
||||
return strings.ToLower(filepath.Ext(f.Name)[1:])
|
||||
}
|
||||
|
||||
func (f *FileToUpload) CreatedAt() *TimeResult {
|
||||
|
Loading…
x
Reference in New Issue
Block a user