Class: Aliyun::Oss::Struct::File

Inherits:
Object show all
Defined in:
lib/aliyun/oss/struct/file.rb

Instance Attribute Summary

Attributes inherited from Object

#bucket, #client, #etag, #key, #last_modified, #location, #owner, #size, #storage_class, #type

Instance Method Summary collapse

Methods inherited from Object

#acl!, init_from_object, init_from_response, #meta!, #set_acl

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Aliyun::Oss::Struct::Base

Instance Method Details

#file?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/aliyun/oss/struct/file.rb', line 5

def file?
  true
end

Get object share link

Parameters:

  • expired_in_seconds (Integer)

    expire after specify seconds

Returns:

  • (URL)


14
15
16
# File 'lib/aliyun/oss/struct/file.rb', line 14

def share_link(expired_in_seconds)
  client.bucket_get_object_share_link(key, expired_in_seconds)
end