overleaf/services/filestore
Jakob Ackermann 0db4a17a14 [HealthCheckController] use fs.copyFile instead of fs-extra.copy
the fs-extra method has a HUGE overhead of JS code and also syscalls for
 no particular benefit in this case: just copy the tiny.pdf file.

Here is an overview of the major operations: paths are relative to
  https://github.com/jprichardson/node-fs-extra/blob/1.0.0

We start in /lib/copy/copy.js
- sys: check that the source file exists
- sys: check that the source file has an existing parent directory?!
Continue in /lib/copy/ncp.js
- sys: more stat calls on both source and dest to determine permissions
- read/write streams to pipe the file content through the process
- sys: chmod on the destination to match the source permissions

What we actually need is a call to the binding and let node/the os
 figure out the best way to copy the contents.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-03-02 17:02:35 +01:00
..
.github replace private link with public one 2019-10-25 11:51:58 -04:00
app/js [HealthCheckController] use fs.copyFile instead of fs-extra.copy 2020-03-02 17:02:35 +01:00
config Update config/settings.defaults.coffee 2020-02-18 10:24:29 +00:00
firejail bumped up rlimit-nproc to 600 2016-12-14 18:15:09 +00:00
template_files Handle templates locally ok 2014-11-27 11:08:29 +00:00
test fix settings unit test 2020-02-28 15:27:29 +00:00
uploads Initial open source commit 2014-02-14 16:39:05 +00:00
user_files Use default settings file 2014-04-02 17:45:41 +01:00
.dockerignore [misc] update the build scripts to 1.3.5 2020-02-11 18:58:55 +01:00
.eslintrc Revert "Merge pull request #91 from overleaf/revert-78-spd-migration-persistor" 2020-02-17 14:04:42 +00:00
.gitignore Rename app/coffee dir to app/js 2019-12-16 10:54:08 +00:00
.nvmrc update to node 10.19.0 2020-02-07 14:16:31 +00:00
.prettierignore Add linting to makefile 2019-12-16 11:58:22 +00:00
.prettierrc [misc] update the build scripts to 1.3.5 2020-02-11 18:58:55 +01:00
app.js Write to error log on unhandled rejection/exception 2020-02-27 10:33:48 +00:00
buildscript.txt [misc] update the build scripts to 1.3.5 2020-02-11 18:58:55 +01:00
docker-compose.ci.yml [misc] update the build scripts to 1.3.5 2020-02-11 18:58:55 +01:00
docker-compose.yml [misc] update the build scripts to 1.3.5 2020-02-11 18:58:55 +01:00
Dockerfile [misc] update the build scripts to 1.3.5 2020-02-11 18:58:55 +01:00
install_deps.sh [misc] update the build scripts to 1.3.5 2020-02-11 18:58:55 +01:00
Jenkinsfile Update build files from build_scripts 2019-12-16 17:17:25 +00:00
LICENSE Create LICENSE 2014-02-19 14:48:15 +00:00
Makefile [misc] update the build scripts to 1.3.5 2020-02-11 18:58:55 +01:00
nodemon.json Update build files from build_scripts 2019-12-16 17:17:25 +00:00
package-lock.json [HealthCheckController] use fs.copyFile instead of fs-extra.copy 2020-03-02 17:02:35 +01:00
package.json [HealthCheckController] use fs.copyFile instead of fs-extra.copy 2020-03-02 17:02:35 +01:00
README.md Update README.md 2019-05-07 17:22:35 +02:00
tiny.pdf added missing files 2016-12-14 17:14:15 +00:00

overleaf/filestore

An API for CRUD operations on binary files stored in S3

filestore acts as a proxy between the CLSIs and (currently) Amazon S3 storage, presenting a RESTful HTTP interface to the CLSIs on port 3009 by default. Urls are mapped to node functions in https://github.com/overleaf/filestore/blob/master/app.coffee . URLs are of the form:

  • /project/:project_id/file/:file_id
  • /template/:template_id/v/:version/:format
  • /project/:project_id/public/:public_file_id
  • /project/:project_id/size
  • /bucket/:bucket/key/*
  • /heapdump
  • /shutdown
  • /status - returns filestore sharelatex up or server is being shut down (HTTP 500)
  • /health_check

License

The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the LICENSE file.

Copyright (c) Overleaf, 2014-2019.