Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 5f6893b

Browse files
committed
Fix file upload by file path
1 parent 758a282 commit 5f6893b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/assemblyai/files/client.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require_relative "../../requests"
44
require_relative "types/uploaded_file"
55
require "async"
6+
require "pathname"
67

78
module AssemblyAI
89
class FilesClient
@@ -25,7 +26,7 @@ def upload(file:, request_options: nil)
2526
if file.is_a? String
2627
begin
2728
path = Pathname.new(file)
28-
rescue StandardError
29+
rescue RuntimeError
2930
file_data = file
3031
end
3132
unless path.nil?

lib/gemconfig.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module AssemblyAI
44
module Gemconfig
5-
VERSION = "1.0.1"
5+
VERSION = "1.0.2"
66
AUTHORS = ["AssemblyAI"].freeze
77
EMAIL = "support@assemblyai.com"
88
SUMMARY = "AssemblyAI Ruby SDK"

0 commit comments

Comments
 (0)