Skip to content

Commit 0647975

Browse files
fix upload to bad dp #1544
1 parent 7dc06a1 commit 0647975

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

BrainPortal/app/controllers/userfiles_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,9 @@ def create #:nodoc:
538538
rack_tempfile_size = upload_stream.tempfile.size
539539

540540
# Get the data provider for the destination files.
541-
data_provider_id = params[:data_provider_id]
541+
data_provider_id = params[:data_provider_id]
542+
543+
DataProvider.find_accessible_by_user(data_provider_id, current_user)
542544

543545
# Where we'll keep a copy in the spawn() below
544546
tmpcontentfile = "/tmp/#{Process.pid}-#{rand(10000).to_s}-#{basename}" # basename's extension is used later on

0 commit comments

Comments
 (0)