uploadcare / uploadcare-ruby

Ruby API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
https://uploadcare.com
MIT License
39 stars 28 forks source link

README is wrong about CDN URL retrieval #148

Closed alxgsv closed 4 months ago

alxgsv commented 5 months ago

Describe the bug

README says:

@file_to_upload = File.open("your-file.png")

@uc_file = Uploadcare::Uploader.upload(@file_to_upload)

@uc_file.uuid
# => "dc99200d-9bd6-4b43-bfa9-aa7bfaefca40"

# URL for the file, can be used with your website or app right away
@uc_file.url
# => "https://ucarecdn.com/dc99200d-9bd6-4b43-bfa9-aa7bfaefca40/"

However in reality:

@uc_file.url
# => "https://api.uploadcare.com/files/dc99200d-9bd6-4b43-bfa9-aa7bfaefca40/"

Expected behavior

README and actual behavior are in sync

Environment