Skip to content

Commit 427d98f

Browse files
authored
Fix image upload (#58)
1 parent b1e5674 commit 427d98f

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### v0.24.1.pre
2+
3+
* bug-fixes
4+
* Fix image upload
5+
16
### v0.24.0.pre
27

38
* features

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
beyond_api (0.23.0.pre)
4+
beyond_api (0.24.1.pre)
55
faraday (~> 1.9.0)
66

77
GEM

lib/beyond_api/resources/products/images.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def upload_multiple_images(product_id, images_path, images_name)
221221
response, status = BeyondApi::Request.upload_by_form(@session,
222222
"/products/#{product_id}/images",
223223
images_path,
224-
file_name: images_name)
224+
file_name: images_name.map { |e| URI.encode_www_form([e]) })
225225

226226
handle_response(response, status)
227227
end

lib/beyond_api/resources/variations/images.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def upload_multiple_images(product_id, variation_id, images_path, images_name)
226226
response, status = BeyondApi::Request.upload_by_form(@session,
227227
"/products/#{product_id}/variations/#{variation_id}/images",
228228
images_path,
229-
file_name: images_name)
229+
file_name: images_name.map { |e| URI.encode_www_form([e]) })
230230

231231
handle_response(response, status)
232232
end

lib/beyond_api/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module BeyondApi
4-
VERSION = "0.24.0.pre"
4+
VERSION = "0.24.1.pre"
55
end

0 commit comments

Comments
 (0)