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

Commit

Permalink
Fix attachments code
Browse files Browse the repository at this point in the history
When downloading an attachment, the byte length of the file is appended, see issue #617.
  • Loading branch information
jnwarp authored and gsingh93 committed Feb 28, 2018
1 parent e4c4c0f commit eb06ec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AttachmentDataController extends DataController {
// Remove all non alpahnum characters from filename - allow international chars, dash, underscore, and period
$filename = preg_replace('/[^\p{L}\p{N}_\-.]+/u', '_', $filename);

$data = readfile(Attachment::attachmentsDir.$filename);
$data = file_get_contents(Attachment::attachmentsDir.$filename);
}
}

Expand Down

0 comments on commit eb06ec4

Please sign in to comment.