Method: Box::Folder#upload

Defined in:
lib/box/folder.rb

#upload(path) ⇒ File

Upload a new file using this folder as the parent

Parameters:

  • path (String)

    The path of the file on disk to upload.

Returns:

  • (File)

    The new file.



64
65
66
67
68
69
70
# File 'lib/box/folder.rb', line 64

def upload(path)
  info = @api.upload(path, id)['files']['file']

  delete_info('files')

  Box::File.new(api, self, info)
end