From 2e311d9d1aac58bbd9c7d6c97c7cbcccf2715347 Mon Sep 17 00:00:00 2001 From: Jarka Kadlecova Date: Mon, 29 May 2017 09:54:35 +0200 Subject: Support uploads for newly created personal snippets --- app/controllers/snippets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/snippets_controller.rb') diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index 1334f7daa44..6c25f59ccbb 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -45,7 +45,7 @@ class SnippetsController < ApplicationController @snippet = CreateSnippetService.new(nil, current_user, create_params).execute - move_temporary_files if params[:files] + move_temporary_files if @snippet.valid? && params[:files] recaptcha_check_with_fallback { render :new } end -- cgit v1.2.1