aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--web/controllers/audio_file_controller.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/controllers/audio_file_controller.ex b/web/controllers/audio_file_controller.ex
index ef9d46c..c4e1af0 100644
--- a/web/controllers/audio_file_controller.ex
+++ b/web/controllers/audio_file_controller.ex
@@ -19,7 +19,7 @@ defmodule TheTranscriberBackend.AudioFileController do
result = Ecto.Adapters.SQL.query!(Repo, query, [])
[[repo_last_id]] = result.rows # A beautiful pattern match :)
- path = "/media/phoenix_test/#{repo_last_id}_#{upload.filename}"
+ path = "/media/phoenix_test/#{repo_last_id + 1}_#{upload.filename}"
File.cp(upload.path, path)
changeset = AudioFile.changeset(%AudioFile{},