GithubHelp home page GithubHelp logo

overleaf / filestore Goto Github PK

View Code? Open in Web Editor NEW
26.0 31.0 28.0 1.96 MB

An API for CRUD operations on binary files stored in S3

License: GNU Affero General Public License v3.0

Dockerfile 0.54% Makefile 2.45% Shell 0.35% JavaScript 96.65%

filestore's Introduction

⚠️ This repository has been migrated into overleaf/overleaf. See the monorepo announcement for more info. ⚠️


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/*
  • /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.

filestore's People

Contributors

aeaton-overleaf avatar briangough avatar cwoac avatar das7pad avatar dependabot[bot] avatar emcsween avatar gh2k avatar goodbest avatar jpallen avatar mans0954 avatar mmazour avatar mrjgreen avatar mserranom avatar natestemen avatar warncke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filestore's Issues

allow users to resize images

A lot of people upload large images, often photos, which causes slow compiles, if there was a button allowing them to resize from inside the editor it could be popular.

Cannot read property 'backend' of undefined

After a "grunt update:all" I am getting the following error output:

root@web01:/opt/sharelatex# grunt run
Running "concurrent:all" (concurrent) task
Running "bunyan" task
Running "bunyan" task
Running "bunyan" task
Running "bunyan" task

Running "execute:web" (execute) task
-> executing /opt/sharelatex/web/app.js
Running "execute:clsi" (execute) task
-> executing /opt/sharelatex/clsi/app.js
Running "execute:document-updater" (execute) task
-> executing /opt/sharelatex/document-updater/app.js

Running "execute:filestore" (execute) task
-> executing /opt/sharelatex/filestore/app.js
[2014-04-01T08:55:54.394Z]  INFO: web-sharelatex/50988 on web01: Generating file fingerprints...
[2014-04-01T08:55:54.412Z]  INFO: web-sharelatex/50988 on web01: /opt/sharelatex/web/public/js/libs/require.js: 0cb51c1a5e8e978cbe069c07f3b8d16d
[2014-04-01T08:55:54.414Z]  INFO: web-sharelatex/50988 on web01: /opt/sharelatex/web/public/js/ide.js: eb4ecf0cb4705df0d6994285b98a50c2
[2014-04-01T08:55:54.415Z]  INFO: web-sharelatex/50988 on web01: /opt/sharelatex/web/public/js/main.js: c44279fbfbfc7988c406b0b01763a5d7
[2014-04-01T08:55:54.416Z]  INFO: web-sharelatex/50988 on web01: /opt/sharelatex/web/public/js/list.js: 8425488fdb5df811b9b85b3061c621a4
[2014-04-01T08:55:54.420Z]  INFO: web-sharelatex/50988 on web01: /opt/sharelatex/web/public/js/libs/pdf.js: 39877fdae4da632887722daaa37fddde
[2014-04-01T08:55:54.431Z]  INFO: web-sharelatex/50988 on web01: /opt/sharelatex/web/public/js/libs/pdf.worker.js: 0501916260115fe0db5163b47a316a76
[2014-04-01T08:55:54.445Z]  INFO: web-sharelatex/50988 on web01: /opt/sharelatex/web/public/stylesheets/mainStyle.css: 8e98b61abe83515232953f44525869bc
[2014-04-01T08:55:54.448Z]  INFO: web-sharelatex/50988 on web01: file does not exist for fingerprints (filePath=/opt/sharelatex/web/public/brand/plans.css)

/opt/sharelatex/filestore/app/js/PersistorManager.js:8
  (_base = settings.filestore).backend || (_base.backend = "s3");
                              ^
TypeError: Cannot read property 'backend' of undefined
    at Object.<anonymous> (/opt/sharelatex/filestore/app/js/PersistorManager.js:8:31)
    at Object.<anonymous> (/opt/sharelatex/filestore/app/js/PersistorManager.js:25:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/opt/sharelatex/filestore/app/js/FileController.js:4:22)
    at Object.<anonymous> (/opt/sharelatex/filestore/app/js/FileController.js:120:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/opt/sharelatex/filestore/app.js:16:20)
    at Object.<anonymous> (/opt/sharelatex/filestore/app.js:153:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
Warning: -> error 8 /opt/sharelatex/filestore/app.js (1394ms) Use --force to continue.

Aborted due to warnings.
    Warning:  Use --force to continue.

        Aborted due to warnings.

The whole error output is here:

Any ideas what am I doing wrong?

Thanks.

Error when starting the sharelatex (with filestore and document-updater?)

Hi,

When I run grunt, I get this message

[2014-02-21T16:31:10.813Z] INFO: filestore/22094 on www.mydomain.com: filestore store listening on localhost:3009
Development Enviroment

events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1042:14)
at listen (net.js:1064:10)
at net.js:1146:9
at asyncCallback (dns.js:68:16)
at Object.onanswer as oncomplete
Warning: -> error 8 /home/janondrus/public_html/sharelatex/document-updater/app.js (4290ms) Use --force to continue.

Aborted due to warnings.
Warning: Use --force to continue.

    Aborted due to warnings.

If I force, sharelatex "works" but get errors messages:

[2014-02-21T16:25:56.317Z] ERROR: web-sharelatex/21753 on www.mydomain.com: error getting doc from doc updater (project_id=53077d6e141266f954000007, doc_id=53077e12141266f954000008)
Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect as oncomplete
--
url: http://localhost:3003/project/53077d6e141266f954000007/doc/53077e12141266f954000008?fromVersion=-1

Any idea where the problem comes from? I configured Amazon S3...

Thanks a lot!
Jan

Upload to filestore should throw error if it cannot write to "user_files"

It seems that, currently, if user_files is not writable by the user running sharelatex, it does not complain when one tries to upload a file.

Silly users like me get all confused when the upload is successful, but the files aren't saved, so the system won't manage a recompile from that point on.

See: /sharelatex#99

(By the way, thanks so much to all devs for the SUPERB work on this tool.)

Improve speed of image conversions

Using imagemagic on our servers is quite slow when safe guards are put in place to prevent too much load. Doing a template takes ~60 seconds atm. One option is to use something like http://transloadit.com which costs money. A new TransloaditHandler could be created which adheres to the same interface as app/coffee/FileConverter.coffee allowing an option for people. @jpallen option would be welcome.

Allow local hosting of files (rather than S3)

All s3 logic is contained in app/coffee/s3wrapper.coffee, so it should be possible to swap out this module with another module with the same API that instead reads and writes from disk.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.