app自动更新功能功能,无法下载问题修正
This commit is contained in:
parent
e165dd6572
commit
ff65bf4ba5
|
@ -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,
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue