Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions cmd/thermal-uploader/uploadjob.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"bufio"
"encoding/json"
"fmt"
"os"
Expand Down Expand Up @@ -259,12 +258,7 @@ func (u *uploadJob) uploadFile(apiClient *api.CacophonyAPI) (int, error) {
if err != nil {
return 0, err
}
f, err := os.Open(u.filename)
if err != nil {
return 0, err
}
defer f.Close()
return apiClient.UploadVideo(bufio.NewReader(f), data)
return apiClient.UploadVideo(u.filename, data)
}

func parseDateTime(filename string, layout string, utctime bool) (time.Time, error) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/TheCacophonyProject/thermal-uploader
go 1.25.0

require (
github.com/TheCacophonyProject/go-api v1.2.3
github.com/TheCacophonyProject/go-api v1.3.0
github.com/TheCacophonyProject/go-config v1.9.1
github.com/TheCacophonyProject/go-utils v0.1.3
github.com/TheCacophonyProject/modemd v1.11.0-tc2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ github.com/TheCacophonyProject/event-reporter/v3 v3.8.0 h1:FYNR+MX5ypyG7UWpogDnD
github.com/TheCacophonyProject/event-reporter/v3 v3.8.0/go.mod h1:WTppJtTBxduasM1Or5SAh4Mm0YrTDnprOChjnGYgyEI=
github.com/TheCacophonyProject/go-api v0.0.0-20190923033957-174cea2ac81c/go.mod h1:FfMpa4cFhNXQ9tuKG18HO6yLExezcJhzjUjBOFocrQw=
github.com/TheCacophonyProject/go-api v1.0.4/go.mod h1:F7UUNgsLhbw7hsiNBMRB9kQz9uXXosVmNToqImz7EA8=
github.com/TheCacophonyProject/go-api v1.2.3 h1:m+UpgU2/gYOPr80sCOi72ybnHHgVgfdIOIvkydU80TM=
github.com/TheCacophonyProject/go-api v1.2.3/go.mod h1:innR3kf5xnua2wbnLvOudI13j2TU1sGY1dxJQJLRZkI=
github.com/TheCacophonyProject/go-api v1.3.0 h1:HMmqbPj/wmXmu68C0LWJMM/xpQnGyjpvWsDQANQJVMI=
github.com/TheCacophonyProject/go-api v1.3.0/go.mod h1:innR3kf5xnua2wbnLvOudI13j2TU1sGY1dxJQJLRZkI=
github.com/TheCacophonyProject/go-config v0.0.0-20190922224052-7c2a21bc6b88/go.mod h1:gPUJLVu408NRz9/P3BrsxzOzLc+KJLrv+jVdDw3RI0Y=
github.com/TheCacophonyProject/go-config v1.9.0/go.mod h1:+y80PSRZudMYuVrYTGOvzc66NxVJWKS4TuU442vmvhY=
github.com/TheCacophonyProject/go-config v1.9.1 h1:TCeogtNYg5eHx2q97DQ1B+RsbjacW+jr7h1TCv1FpAk=
Expand Down