Use of event.sendFile delivers a file with single quotes in the name

Description

When using the `sendFile` method, line 1244 of RequestContext.cfc uses single quotes around the `filename` param in the header. When sending non-inline files, ( e.g. ZIP files ) this causes the file to be downloaded with single quotes around the file's name, making the file mime type unreadable by the system.

https://github.com/ColdBox/coldbox-platform/blob/development/system/web/context/RequestContext.cfc#L1244

This behavior has been replicated across all browsers. This is a blocker for the use of `sendFile` with attachments.

Usage:

{{event.sendFile(
file=filePath,
disposition='attachment',
deleteFile=true
);}}

Instead of single quotes, the filename should be escaped using `urlEncodedFormat`.

Status

Assignee

Luis Majano

Reporter

Jon Clausen

Labels

None

Components

Fix versions

Priority

Blocker
Configure