Skip to content

client.upload_file_by_folder_id does not overwrite existing file name #95

Open
@thomasta

Description

@thomasta

Using upload_file_by_folder_id with the default overwrite=true fails when an existing file is present in the Box upload folder.

ruby-box (1.14.0)

irb(main):011:0* client.upload_file_by_folder_id('<My\Dir', '123456')
RubyBox::RequestError: Method Not Allowed
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/session.rb:128:in handle_errors' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/session.rb:87:in request'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/session.rb:48:in get' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/item.rb:68:in reload_meta'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/item.rb:85:in method_missing' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/file.rb:54:in update_content'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/folder.rb:23:in upload_file' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/client.rb:140:in block in upload_file_to_folder'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/client.rb:139:in open' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/client.rb:139:in upload_file_to_folder'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-box-1.14.0/lib/ruby-box/client.rb:106:in upload_file_by_folder_id' from (irb):11 from C:/Ruby200/bin/irb:12:in

'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions