Permalink
Browse files

Spelling mistake

* Modified table column
  • Loading branch information...
1 parent 2b3445b commit 50971ed23e722aaf8db8145e2eede686fb8bbe10 @stakach committed Feb 2, 2012
@@ -134,7 +134,7 @@
};
if(!!options.additionalParameters)
- params['resume[custom]'] = JSON.stringify(typeof(options.additionalParameters) == 'function' ? options.additionalParameters(file) : options.additionalParameters);
+ params['resume[paramters]'] = JSON.stringify(typeof(options.additionalParameters) == 'function' ? options.additionalParameters(file) : options.additionalParameters);
//
// Ensure the slice method is defined
@@ -220,7 +220,7 @@
params;
if(!!options.additionalParameters)
- f.append('custom', JSON.stringify(typeof(options.additionalParameters) == 'function' ? options.additionalParameters(file) : options.additionalParameters));
+ f.append('paramters', JSON.stringify(typeof(options.additionalParameters) == 'function' ? options.additionalParameters(file) : options.additionalParameters));
f.append('uploaded_file', file);
@@ -58,7 +58,7 @@ def resumable_upload
#
# Check if file is a valid format before upload
#
- resp = check_format_supported(user, resume.file_name, resume.paramters)
+ resp = check_format_supported(user, resume.file_name, resume.custom_params)
if resp != true
process_bad_request(resp)
return # Ensure only a single call to render
@@ -83,7 +83,7 @@ def resumable_upload
next_part = resume.apply_part(params[:part].to_i, params[:chunk])
if next_part == false
- resp = inform_upload_completed(user, resume.file_name, resume.file_location, resume.paramters, resume)
+ resp = inform_upload_completed(user, resume.file_name, resume.file_location, resume.custom_params, resume)
#
# Check response
@@ -111,14 +111,14 @@ def regular_upload # Well still HTML5 (just not multi-part)
filepath = Resumable.sanitize_filename(params[:uploaded_file].original_filename, user)
- if !params[:custom].nil? # Normalise params
- params[:custom] = JSON.parse(params[:custom], {:symbolize_names => true})
+ if !params[:custom_params].nil? # Normalise params
+ params[:custom_params] = JSON.parse(params[:custom_params], {:symbolize_names => true})
end
#
# Check if file is the correct format before copying out of temp folder
#
- resp = check_format_supported(user, params[:uploaded_file].original_filename, params[:custom])
+ resp = check_format_supported(user, params[:uploaded_file].original_filename, params[:custom_params])
if resp != true
process_bad_request(resp)
return # Ensure only a single call to render
@@ -131,7 +131,7 @@ def regular_upload # Well still HTML5 (just not multi-part)
# Inform that upload is complete (file in uploads directory)
#
resp = false
- resp = inform_upload_completed(user, params[:uploaded_file].original_filename, filepath, params[:custom])
+ resp = inform_upload_completed(user, params[:uploaded_file].original_filename, filepath, params[:custom_params])
if resp != true
process_bad_request(resp)
@@ -44,13 +44,13 @@ def apply_part(part, chunk)
#
- # Store any paramters that were passed with this object
+ # Store any custom params that were passed with this object
#
- def paramters
- if self[:paramters].nil?
- return nil
+ def custom_params
+ if self[:custom_params].nil?
+ return {}
end
- JSON.parse(self[:paramters], {:symbolize_names => true})
+ JSON.parse(self[:custom_params], {:symbolize_names => true})
end
##
@@ -3,7 +3,7 @@ def change
create_table :resolute_resumables do |t|
t.string :user_id, :allow_null => false
- t.text :paramters
+ t.text :custom_params
t.string :file_name, :allow_null => false
t.integer :file_size, :allow_null => false

0 comments on commit 50971ed

Please sign in to comment.