parent
dc5b7f708a
commit
78fc89d462
|
@ -365,10 +365,10 @@ AsyncFileResponse::AsyncFileResponse(FS &fs, String path, String contentType, bo
|
||||||
|
|
||||||
if(download) {
|
if(download) {
|
||||||
// set filename and force download
|
// set filename and force download
|
||||||
snprintf(buf, sizeof (buf), "attachment; filename='%s'", filename);
|
snprintf(buf, sizeof (buf), "attachment; filename=\"%s\"", filename);
|
||||||
} else {
|
} else {
|
||||||
// set filename and force rendering
|
// set filename and force rendering
|
||||||
snprintf(buf, sizeof (buf), "inline; filename='%s'", filename);
|
snprintf(buf, sizeof (buf), "inline; filename=\"%s\"", filename);
|
||||||
}
|
}
|
||||||
addHeader("Content-Disposition", buf);
|
addHeader("Content-Disposition", buf);
|
||||||
|
|
||||||
|
@ -394,9 +394,9 @@ AsyncFileResponse::AsyncFileResponse(File content, String path, String contentTy
|
||||||
_contentType = contentType;
|
_contentType = contentType;
|
||||||
|
|
||||||
if(download) {
|
if(download) {
|
||||||
snprintf(buf, sizeof (buf), "attachment; filename='%s'", filename);
|
snprintf(buf, sizeof (buf), "attachment; filename=\"%s\"", filename);
|
||||||
} else {
|
} else {
|
||||||
snprintf(buf, sizeof (buf), "inline; filename='%s'", filename);
|
snprintf(buf, sizeof (buf), "inline; filename=\"%s\"", filename);
|
||||||
}
|
}
|
||||||
addHeader("Content-Disposition", buf);
|
addHeader("Content-Disposition", buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue