From ff65bf4ba58a762c25b4960039a2b5780fa945a0 Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 13 Mar 2015 17:10:22 +0800 Subject: [PATCH] =?UTF-8?q?app=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/upgrade.rb | 2 +- app/controllers/attachments_controller.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/mobile/apis/upgrade.rb b/app/api/mobile/apis/upgrade.rb index e6a7916d9..9ce1831f3 100644 --- a/app/api/mobile/apis/upgrade.rb +++ b/app/api/mobile/apis/upgrade.rb @@ -15,7 +15,7 @@ module Mobile if attachment.nil? raise '未发现客户端!' end - url = Setting.host_name + "/attachments/download/" + attachment.id.to_s + "/" + attachment.filename + url = "http://" + Setting.host_name + "/attachments/download/" + attachment.id.to_s + "/" + attachment.filename { version: @current_version.version, url: url, diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 72f4bdd92..23b080d94 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -20,9 +20,9 @@ class AttachmentsController < ApplicationController before_filter :find_project, :only => [:show, :download, :thumbnail, :destroy, :delete_homework]#, :except => [:upload, :autocomplete] before_filter :file_readable, :read_authorize, :only => [:show, :thumbnail]#Modified by young - before_filter :delete_authorize, :only => :destroy - before_filter :authorize_global, :only => :upload - before_filter :authorize_attachment_download1, :only => :download + before_filter :delete_authorize, :only => [:destroy] + before_filter :authorize_global, :only => [:upload] + before_filter :authorize_attachment_download1, :only => [:download] #before_filter :login_without_softapplication, only: [:download] accept_api_auth :show, :download, :upload require 'iconv'