Class: GroupDocsViewerCloud::UploadFileRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/groupdocs_viewer_cloud/api/file_api.rb

Overview

Request model for upload_file operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, file, storage_name = nil) ⇒ UploadFileRequest

Initializes a new instance.

Parameters:

  • path

    Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.

  • file

    File to upload

  • storage_name (defaults to: nil)

    Storage name



723
724
725
726
727
# File 'lib/groupdocs_viewer_cloud/api/file_api.rb', line 723

def initialize(path, file, storage_name = nil)
   self.path = path
   self.file = file
   self.storage_name = storage_name
end

Instance Attribute Details

#fileObject

File to upload



714
715
716
# File 'lib/groupdocs_viewer_cloud/api/file_api.rb', line 714

def file
  @file
end

#pathObject

Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.



712
713
714
# File 'lib/groupdocs_viewer_cloud/api/file_api.rb', line 712

def path
  @path
end

#storage_nameObject

Storage name



716
717
718
# File 'lib/groupdocs_viewer_cloud/api/file_api.rb', line 716

def storage_name
  @storage_name
end