Framework: The filename fallback must only contain ASCII characters

Created on 12 Nov 2013  路  7Comments  路  Source: laravel/framework

When try to use Response::download with UTF8 filename, got error: "The filename fallback must only contain ASCII characters". I have no influence on the file name (users puts it to shared directory), so I need to display filelist and put button to download each of them as is.

All 7 comments

That's a Symfony restraint.

And that's all? :)) I really need to use CI helper to download files? It works perfectly: https://github.com/EllisLab/CodeIgniter/blob/develop/system/helpers/download_helper.php

That file you just linked is horrible. Please don't litter issues with bad PHP. This is good PHP land. Even linking to it is a laravel sin. Sinner.

Why can't you modify the name? I mean when they upload remove weird characters? or replace ' ' with '_' and stuff?

RobinMalfait: as I wrote earlier, I can not interfere in the file name.
robclancy: I know that the quoted code quality is not the best, but at least it works

I believe bad was my wording. It is bad code. No where near "best".

robclancy: but it works :) As common user, I prefer more dirty but working code than clean but not working. Until the code is safe I do not care about the style source.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RomainSauvaire picture RomainSauvaire  路  3Comments

jackmu95 picture jackmu95  路  3Comments

PhiloNL picture PhiloNL  路  3Comments

lzp819739483 picture lzp819739483  路  3Comments

klimentLambevski picture klimentLambevski  路  3Comments