mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Preview up to Two Megabytes of bib files
This commit is contained in:
@@ -3,6 +3,8 @@ define [
|
||||
], (App) ->
|
||||
App.controller "BinaryFileController", ["$scope", "$rootScope", "$http", "$timeout", ($scope, $rootScope, $http, $timeout) ->
|
||||
|
||||
TWO_MEGABYTES = 2 * 1024 * 1024
|
||||
|
||||
$scope.bibtexPreview =
|
||||
loading: false
|
||||
error: false
|
||||
@@ -20,7 +22,7 @@ define [
|
||||
return file.name.split(".").pop()?.toLowerCase()
|
||||
|
||||
$scope.loadBibtexFilePreview = () ->
|
||||
url = "/project/#{project_id}/file/#{$scope.openFile.id}?range=0-5000"
|
||||
url = "/project/#{project_id}/file/#{$scope.openFile.id}?range=0-#{TWO_MEGABYTES}"
|
||||
$scope.bibtexPreview.loading = true
|
||||
$http.get(url)
|
||||
.success (data) ->
|
||||
|
||||
Reference in New Issue
Block a user