rename ref and url fields to upload_source and upload_referer_url
This commit is contained in:
@@ -44,7 +44,7 @@ class UploadsController < ApplicationController
|
|||||||
|
|
||||||
def preprocess
|
def preprocess
|
||||||
@upload, @post, @source, @remote_size = UploadService::ControllerHelper.prepare(
|
@upload, @post, @source, @remote_size = UploadService::ControllerHelper.prepare(
|
||||||
url: params[:url], file: params[:file], ref: params[:ref]
|
url: upload_params[:source], file: upload_params[:file], ref: upload_params[:referer_url]
|
||||||
)
|
)
|
||||||
render body: nil
|
render body: nil
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ Upload.initialize_info_bookmarklet = function() {
|
|||||||
Upload.initialize_info_manual = function() {
|
Upload.initialize_info_manual = function() {
|
||||||
$("#fetch-data-manual").click(function(e) {
|
$("#fetch-data-manual").click(function(e) {
|
||||||
var source = $("#upload_source,#post_source").val();
|
var source = $("#upload_source,#post_source").val();
|
||||||
var referer = $("#ref").val();
|
var referer = $("#upload_referer_url").val();
|
||||||
|
|
||||||
if (/^https?:\/\//.test(source)) {
|
if (/^https?:\/\//.test(source)) {
|
||||||
$("#source-info span#loading-data").show();
|
$("#source-info span#loading-data").show();
|
||||||
|
|||||||
@@ -18,9 +18,8 @@
|
|||||||
<div id="client-errors" class="error-messages ui-state-error ui-corner-all" style="display:none"></div>
|
<div id="client-errors" class="error-messages ui-state-error ui-corner-all" style="display:none"></div>
|
||||||
|
|
||||||
<%= form_for(@upload, :html => {:multipart => true, :class => "simple_form", :id => "form"}) do |f| %>
|
<%= form_for(@upload, :html => {:multipart => true, :class => "simple_form", :id => "form"}) do |f| %>
|
||||||
<%= hidden_field_tag :url, params[:url] %>
|
|
||||||
<%= hidden_field_tag :ref, params[:ref] %>
|
|
||||||
<%= f.hidden_field :md5_confirmation %>
|
<%= f.hidden_field :md5_confirmation %>
|
||||||
|
<%= f.hidden_field :referer_url, value: params[:ref] %>
|
||||||
|
|
||||||
<% if CurrentUser.can_upload_free? %>
|
<% if CurrentUser.can_upload_free? %>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
@@ -160,7 +159,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$("#filedropzone").dropzone({
|
$("#filedropzone").dropzone({
|
||||||
paramName: "file",
|
paramName: "upload[file]",
|
||||||
url: "/uploads/preprocess",
|
url: "/uploads/preprocess",
|
||||||
createImageThumbnails: false,
|
createImageThumbnails: false,
|
||||||
addRemoveLinks: false,
|
addRemoveLinks: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user