rename ref and url fields to upload_source and upload_referer_url

This commit is contained in:
Albert Yi
2018-08-29 16:46:04 -07:00
parent 692c3ddac8
commit 64c3bc18a7
3 changed files with 4 additions and 5 deletions

View File

@@ -44,7 +44,7 @@ class UploadsController < ApplicationController
def preprocess
@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
end

View File

@@ -87,7 +87,7 @@ Upload.initialize_info_bookmarklet = function() {
Upload.initialize_info_manual = function() {
$("#fetch-data-manual").click(function(e) {
var source = $("#upload_source,#post_source").val();
var referer = $("#ref").val();
var referer = $("#upload_referer_url").val();
if (/^https?:\/\//.test(source)) {
$("#source-info span#loading-data").show();

View File

@@ -18,9 +18,8 @@
<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| %>
<%= hidden_field_tag :url, params[:url] %>
<%= hidden_field_tag :ref, params[:ref] %>
<%= f.hidden_field :md5_confirmation %>
<%= f.hidden_field :referer_url, value: params[:ref] %>
<% if CurrentUser.can_upload_free? %>
<div class="input">
@@ -160,7 +159,7 @@
}
$("#filedropzone").dropzone({
paramName: "file",
paramName: "upload[file]",
url: "/uploads/preprocess",
createImageThumbnails: false,
addRemoveLinks: false,