Initial commit

This commit is contained in:
Yaser
2026-08-13 19:56:46 +03:30
commit de1d57a67b
474 changed files with 43185 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# frozen_string_literal: true
require 'aliyun/oss'
class AliUploader < UploadUploader
def url
bucket.object_url(Barong::App.config.storage_bucket_name + '/' + path)
end
def bucket
@_bucket = client.get_bucket(Barong::App.config.storage_bucket_name)
end
def client
@_client ||= Aliyun::OSS::Client.new(
endpoint: "oss-#{Barong::App.config.storage_region}.aliyuncs.com",
access_key_id: Barong::App.config.storage_access_key,
access_key_secret: Barong::App.config.storage_secret_key,
)
end
end