This commit is contained in:
G. Gibson 2022-04-22 10:03:19 -07:00
parent 5df317240c
commit a1c6f7f372

View file

@ -1190,6 +1190,7 @@ module GxGwww
def download_file(details={}) def download_file(details={})
# {:path => "/path/to/object"} # {:path => "/path/to/object"}
response = [404, {"content-type" => "application/json"}, ({:result => false, :error => "Object Not Found."}).to_json()] response = [404, {"content-type" => "application/json"}, ({:result => false, :error => "Object Not Found."}).to_json()]
puts "Download Got: #{details.inspect}"
begin begin
# #
temp_dir = "/Temporary/#{::GxG::uuid_generate().to_s}" temp_dir = "/Temporary/#{::GxG::uuid_generate().to_s}"
@ -1208,6 +1209,7 @@ module GxGwww
details[:path] = ("/Public/www/" << details[:path].to_s).gsub("//","/") details[:path] = ("/Public/www/" << details[:path].to_s).gsub("//","/")
end end
# #
puts "Download Path: #{details.inspect}"
# temp_file = "#{temp_dir}/#{File.basename((details[:path] || 'Untitled').to_s)}" # temp_file = "#{temp_dir}/#{File.basename((details[:path] || 'Untitled').to_s)}"
if GxG::SERVICES[:core][:resources].exist?(details[:path]) if GxG::SERVICES[:core][:resources].exist?(details[:path])
profile = GxG::SERVICES[:core][:resources].profile(details[:path], @credential) profile = GxG::SERVICES[:core][:resources].profile(details[:path], @credential)