Sha256: 9599e61eac2d0133d6127ab84eb976743324d85634e8bf1a254e72fcf955a704
Contents?: true
Size: 1.26 KB
Versions: 12
Compression:
Stored size: 1.26 KB
Contents
# frozen_string_literal: true module Fog module Storage class Aliyun class Real # Delete an existing object # # ==== Parameters # * object<~String> - Name of object to delete # def delete_object(object, options = {}) bucket = options[:bucket] bucket ||= @aliyun_oss_bucket location = get_bucket_location(bucket) endpoint = 'http://' + location + '.aliyuncs.com' resource = bucket + '/' + object request( expects: 204, method: 'DELETE', path: object, bucket: bucket, resource: resource, endpoint: endpoint ) end def abort_multipart_upload(bucket, object, endpoint, uploadid) if endpoint.nil? location = get_bucket_location(bucket) endpoint = 'http://' + location + '.aliyuncs.com' end path = object + '?uploadId=' + uploadid resource = bucket + '/' + path ret = request( expects: 204, method: 'DELETE', path: path, bucket: bucket, resource: resource, endpoint: endpoint ) end end end end end
Version data entries
12 entries across 10 versions & 2 rubygems