Skip to content

Commit 962c407

Browse files
committed
fix #2: concatenate filename and filetype
1 parent e909609 commit 962c407

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: pyexcel_webio/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ def make_response(pyexcel_instance, file_type,
268268
io = pe.get_io(file_type)
269269
pyexcel_instance.save_to_memory(file_type, io, **keywords)
270270
io.seek(0)
271+
if file_name:
272+
if not file_name.endswith(file_type):
273+
file_name = "%s.%s" % (file_name, file_type)
271274
return ExcelResponse(io.read(),
272275
content_type=FILE_TYPE_MIME_TABLE[file_type],
273276
status=status, file_name=file_name)

0 commit comments

Comments
 (0)