[Seaside] Downloads and filenames with diacritics
sebastian at flowingconcept.com
Tue Sep 28 16:24:26 UTC 2010
Yeah, we actually saw that possibility but I was hoping to make the app not to be forced to maintain the original name in the database (so it can't never be confused about it nor inject maintenance costs).
What do you guys think about some other way to encode the filename that preserves the original (with diacritics) but for the OS (and xsendfile) it can look like a non-diacritical one?
any ideas? (or encoders to suggest?)
On Sep 28, 2010, at 1:11 PM, Miguel Cobá wrote:
> El mar, 28-09-2010 a las 13:03 -0300, Sebastian Sastre escribió:
>> Hi guys,
>> I've been using this:
>> (GRCodec forEncoding: 'utf-8') encode: aFilaname
>> just before writing an uploaded file (that probably has diacritics in its name).
>> The thing is that xsendfile doesn't find the ones with diacritics and the download fails. Non diacritical downloads works just fine.
>> As workaround I'm forcing filenames to be non-diacritical while we find a solution.
>> Wonder if any of you guys have solved making your webapp to offer files download even when the filenames has diacriticals? I mean with xsendfile (from a seaside app of course).
> Store the files with numbers and save the original name in the database.
> Xsendfile the numbered file and state that the file should be offered
> with the original name. For example, in PHP:
> header("X-Sendfile: $numberedfile");
> header("Content-Type: application/octet-stream");
> header("Content-Disposition: attachment; file=\"$originalname\"");
> The downloaded file needs not to be the same name that the save as
> offered by the browser.
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
> Miguel Cobá
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside