Update image uploader to add `file_type`

pull/974/head
Connor Rigby 2018-11-15 12:25:23 -08:00
parent f2b8abd692
commit a4c1eac2d2
No known key found for this signature in database
GPG Key ID: 29A88B24B70456E0
2 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,7 @@ defmodule Farmbot.BotState.JobProgress do
percent: integer,
unit: :percent,
type: :image | :ota,
file_type: binary(),
time: DateTime.t()
}
end
@ -40,6 +41,7 @@ defmodule Farmbot.BotState.JobProgress do
bytes: integer,
unit: :bytes,
type: :image | :ota,
file_type: binary(),
time: DateTime.t()
}
end

View File

@ -63,8 +63,9 @@ defmodule Farmbot.API do
prog = %Percent{
status: :working,
percent: 0,
time: DateTime.utc_now(),
type: :image
file_type: Path.extname(image_filename),
type: :image,
time: DateTime.utc_now()
}
stream =