Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working for excel files #1

Open
antoniomerlin opened this issue Feb 22, 2017 · 1 comment
Open

Not working for excel files #1

antoniomerlin opened this issue Feb 22, 2017 · 1 comment

Comments

@antoniomerlin
Copy link

mhndev\slimFileResponse\FileResponse::getResponse($response, $_SERVER["DOCUMENT_ROOT"]."/uploads/tmp_img_placer/".$status[data])

providing response header :

Cache-Control →no-store, no-cache, must-revalidate, post-check=0, pre-check=0, private
Connection →Keep-Alive
Content-Disposition →filename="1487746864.xlsx"
Content-Length →126771
Content-Type →application/octet-stream
Date →Wed, 22 Feb 2017 07:01:04 GMT
Expires →Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive →timeout=5, max=100
Pragma →no-cache
Server →Apache/2.4.23 (Win64) PHP/5.6.25
X-Powered-By →PHP/5.6.25

Due which file saving in All file format

@mhndev
Copy link
Owner

mhndev commented Feb 23, 2017

the reason it wasn't working was, you should have name your document with extension like following
mhndev\slimFileResponse\FileResponse::getResponse($response, $filePath ,'myDocument.xlsx');

but now I fixed it, now if you type your filename to be myDoc it checks origin file extension and concatenate it with the extension just update your project composer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants