Skip to content

Commit

Permalink
Large file can't preview in web
Browse files Browse the repository at this point in the history
  • Loading branch information
lwl12 committed Nov 25, 2018
1 parent 31c84e6 commit 4c61ccd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions view/material/show/doc.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php
$url = 'https://view.officeapps.live.com/op/view.aspx?src='.urlencode($item['downloadUrl']);
view::direct($url);
exit();
if ($item["size"] < 10000000) {
$url = 'https://view.officeapps.live.com/op/view.aspx?src='.urlencode($item['downloadUrl']);
view::direct($url);
} else {
view::direct($item['downloadUrl']);
}
exit();
?>

0 comments on commit 4c61ccd

Please sign in to comment.