diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/pipeline/put.go | 4 | ||||
-rw-r--r-- | internal/pipeline/put_test.go | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/internal/pipeline/put.go b/internal/pipeline/put.go index 444735a..1be36f0 100644 --- a/internal/pipeline/put.go +++ b/internal/pipeline/put.go @@ -80,7 +80,9 @@ func DetectQueueType(dir string, conn Queuer) string { // UploadImages uploads all files (except those which start with a ".") // from a directory (recursively) into conn.WIPStorageId(), prefixed with -// the given bookname and a slash +// the given bookname and a slash. It also appends all file names with +// sequential numbers, like 0001, to ensure they are appropriately named +// for further processing in the pipeline. func UploadImages(dir string, bookname string, conn Uploader) error { files, err := ioutil.ReadDir(dir) if err != nil { diff --git a/internal/pipeline/put_test.go b/internal/pipeline/put_test.go index 5fb5b43..66fa0c2 100644 --- a/internal/pipeline/put_test.go +++ b/internal/pipeline/put_test.go @@ -77,7 +77,7 @@ func Test_DetectQueueType(t *testing.T) { func Test_UploadImages(t *testing.T) { var slog StrLog - vlog := log.New(&slog, "", 0) + vlog := log.New(&slog, "", 0) var conns []connection conns = append(conns, connection{name: "local", c: &bookpipeline.LocalConn{Logger: vlog}}) |