MCPcopy Create free account
hub / github.com/apache/arrow / upload

Method upload

dev/release/binary-task.rb:663–680  ·  view source on GitHub ↗
(path, destination_path)

Source from the content-addressed store, hash-verified

661 end
662
663 def upload(path, destination_path)
664 destination_url = build_deployed_url(destination_path)
665 with_retry(3, destination_url) do
666 sha1 = Digest::SHA1.file(path).hexdigest
667 sha256 = Digest::SHA256.file(path).hexdigest
668 headers = {
669 "X-Artifactory-Last-Modified" => File.mtime(path).rfc2822,
670 "X-Checksum-Deploy" => "false",
671 "X-Checksum-Sha1" => sha1,
672 "X-Checksum-Sha256" => sha256,
673 "Content-Length" => File.size(path).to_s,
674 "Content-Type" => "application/octet-stream",
675 }
676 File.open(path, "rb") do |input|
677 request(:put, headers, destination_url, body: input)
678 end
679 end
680 end
681
682 def copy(source, destination)
683 url = build_api_url("copy/arrow/#{source}",

Callers

nothing calls this directly

Calls 3

to_sMethod · 0.45
sizeMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected