ruby/box_api.rb
def upload_file(folder_id, file_url) 
	puts "Uploading file: " + file_url + " to folder: " + folder_id
	file = {
		:url => file_url, 
		:name => "Ruby_File.pdf", 
		:notes => "This was uploaded using Ruby", 
		:copies => 1, 
		:folderId => folder_id,
		# :flow => "Flow ezName" # The flow value is either the easy submit name of the flow or the _id property from get_flows()
	}
	data = JSON.generate(file)
	response = request_post('/api/partner/file', data)
	puts response.body
end
# Upload a file to a specified folder in Box.
#
# Param: 
#   folder_id - Id of the folder to upload to
#   file_url - Url of the file to upload (not a local path)
Upload a file to a specified folder in Box.
Param:
folder_id - Id of the folder to upload to
file_url - Url of the file to upload (not a local path)
Upload a file to a specified folder in Box . Param : folder_id - Id of the folder to upload to file_url - Url of the file to upload ( not a local path )
def upload_file(folder_id, file_url) 
	puts "Uploading file: " + file_url + " to folder: " + folder_id
	file = {
		:url => file_url, 
		:name => "Ruby_File.pdf", 
		:notes => "This was uploaded using Ruby", 
		:copies => 1, 
		:folderId => folder_id,
	}
	data = JSON.generate(file)
	response = request_post('/api/partner/file', data)
	puts response.body
end
def upload_file ( folder_id , file_url ) puts "Uploading file: " + file_url + " to folder: " + folder_id file = { :url => file_url , :name => "Ruby_File.pdf" , :notes => "This was uploaded using Ruby" , :copies => 1 , :folderId => folder_id , } data = JSON . generate ( file ) response = request_post ( '/api/partner/file' , data ) puts response . body end
Upload a file to a specified folder in Box.
Upload a file to a specified folder in Box .
# :flow => "Flow ezName" # The flow value is either the easy submit name of the flow or the _id property from get_flows()
folder_id
file_url