Class: Ipfs::FileUploadRequest
- Defined in:
- lib/ruby-ipfs-http-client/request/file_upload_request.rb
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
-
#initialize(path, filepath) ⇒ FileUploadRequest
constructor
A new instance of FileUploadRequest.
- #options ⇒ Object
Constructor Details
#initialize(path, filepath) ⇒ FileUploadRequest
Returns a new instance of FileUploadRequest.
5 6 7 8 9 |
# File 'lib/ruby-ipfs-http-client/request/file_upload_request.rb', line 5 def initialize(path, filepath) super(path, :post) @filepath = filepath end |
Instance Method Details
#options ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/ruby-ipfs-http-client/request/file_upload_request.rb', line 11 def { form: { arg: HTTP::FormData::File.new(@filepath) } } end |