ifad / carrierwave-colore

Carrier wave plugin for Colore
MIT License
0 stars 2 forks source link

Fix URI::InvalidURIError with accented characters #1

Closed pzac closed 6 years ago

pzac commented 6 years ago

Accented characters in filenames produce URI::InvalidURIError exceptions at upload time. Didn't add the active support dependency in gemspec to prevent dependency hell.

lleirborras commented 6 years ago

I would say yes, if it's needed. I know puristst will say this is an unnecessary dependency so unless there's any other way to deal with it in pure ruby std library please go ahead

On Tue, May 15, 2018 at 4:24 PM, Paolo Zaccagnini notifications@github.com wrote:

@pzac commented on this pull request.

In lib/carrierwave/storage/colore.rb https://github.com/ifad/carrierwave-colore/pull/1#discussion_r188306750:

@@ -75,9 +75,16 @@ def read #

@param file [CarrierWave::SanitizedFile]

def store(new_file)

  • filename = new_file.filename
  • Strip URL-unfriendly characters if we've got ActiveSupport around

Suffer. Shall I add it to the gemspec as a dependency?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ifad/carrierwave-colore/pull/1#discussion_r188306750, or mute the thread https://github.com/notifications/unsubscribe-auth/AACIZ-OH6asmFs3s8FGS5llyRaKoPMDdks5tyuUUgaJpZM4T_ICn .

-- Lleïr Borràs i Metje http://about.me/lleir http://about.me/lleir