app自动更新功能功能,无法下载问题修正

memcached_alan
z9hang 11 years ago
parent e165dd6572
commit ff65bf4ba5

@ -15,7 +15,7 @@ module Mobile
if attachment.nil? if attachment.nil?
raise '未发现客户端!' raise '未发现客户端!'
end 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, version: @current_version.version,
url: url, url: url,

@ -20,9 +20,9 @@ class AttachmentsController < ApplicationController
before_filter :find_project, :only => [:show, :download, :thumbnail, :destroy, :delete_homework]#, :except => [:upload, :autocomplete] 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 :file_readable, :read_authorize, :only => [:show, :thumbnail]#Modified by young
before_filter :delete_authorize, :only => :destroy before_filter :delete_authorize, :only => [:destroy]
before_filter :authorize_global, :only => :upload before_filter :authorize_global, :only => [:upload]
before_filter :authorize_attachment_download1, :only => :download before_filter :authorize_attachment_download1, :only => [:download]
#before_filter :login_without_softapplication, only: [:download] #before_filter :login_without_softapplication, only: [:download]
accept_api_auth :show, :download, :upload accept_api_auth :show, :download, :upload
require 'iconv' require 'iconv'

Loading…
Cancel
Save