Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit eb06ec4

Browse files
jnwarpgsingh93
authored andcommitted
Fix attachments code
When downloading an attachment, the byte length of the file is appended, see issue #617.
1 parent e4c4c0f commit eb06ec4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/data/attachment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AttachmentDataController extends DataController {
2525
// Remove all non alpahnum characters from filename - allow international chars, dash, underscore, and period
2626
$filename = preg_replace('/[^\p{L}\p{N}_\-.]+/u', '_', $filename);
2727

28-
$data = readfile(Attachment::attachmentsDir.$filename);
28+
$data = file_get_contents(Attachment::attachmentsDir.$filename);
2929
}
3030
}
3131

0 commit comments

Comments
 (0)