diff --git a/lib/vimeo_me2/user/upload.rb b/lib/vimeo_me2/user/upload.rb index c4688a7..b0251ee 100644 --- a/lib/vimeo_me2/user/upload.rb +++ b/lib/vimeo_me2/user/upload.rb @@ -32,10 +32,15 @@ def pull_upload name, link, options = {} def change_name name = nil video = VimeoMe2::Video.new(@token, @ticket['uri']) - video.name = name || @video.original_filename + video.name = name || get_file_name video.update end + def get_file_name + return @video.path if @video.is_a? File + return @video.original_filename + end + # 3.4 Update def create_video tus = {approach: 'tus', size: @video.size.to_s}