Skip Menu |

This queue is for tickets about the Catalyst-Plugin-Unicode CPAN distribution.

Report information
The Basics
Id: 49032
Status: rejected
Priority: 0/
Queue: Catalyst-Plugin-Unicode

People
Owner: Nobody in particular
Requestors: erik.gimbert [...] groupsquad.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Prepare filename in upload
Date: Wed, 26 Aug 2009 20:09:18 +0200
To: bug-Catalyst-Plugin-Unicode [...] rt.cpan.org
From: Erik Gimbert <erik.gimbert [...] groupsquad.com>
Filename in uploads wasn't decode by prepare_parameters. To decode filename you can add the next method : sub prepare_uploads { my $c = shift; $c->next::method(@_); for my $value ( values %{ $c->request->{uploads} } ) { if ( ref $value && ref $value !~ /^(?:ARRAY|Catalyst::Request::Upload)$/ ) { next; } my $fn; for ( ref($value) eq 'ARRAY' ? @{$value} : $value ) { $fn = $_->filename; utf8::decode($fn); $_->filename($fn); } } } Erik
I don't intend to add this feature as Catalyst::Plugin::Unicode::Encoding does this correctly already and is preferred to this module..