- upload_folder = get_upload_path(uuid, should_dedupe)
- url_path = get_url(name, uuid, should_dedupe)
-
- File.mkdir_p!(upload_folder)
- result_file = Path.join(upload_folder, name)
-
- if should_dedupe do
- if !File.exists?(result_file) do
- File.rename(uuidpath, result_file)
- else
- File.rm!(uuidpath)
- end
- else
- File.rename(uuidpath, result_file)
- end
+ {:ok, url_path} = @storage_backend.put_file(name, uuid, tmp_path, content_type, should_dedupe)