28 Commits

Author SHA1 Message Date
Tom Moor
447371f35a
fix: Add server-side proxy support via fetch-with-proxy (#2044)
* fix: Add server-side proxy support via fetch-with-proxy

closes #1893

For some fun discussion on why this is required, see this issue: https://github.com/nodejs/node/issues/8381

* lint
2021-05-12 22:37:32 -07:00
Tom Moor
df233c95a9 refactor: Upload file to storage, and then pass attachmentId to collections.import
This avoids having large file uploads going directly to the server and allows us to fetch it async into a worker process
2021-02-18 22:36:07 -08:00
Tom Moor
86d9a14c5c fix: is virtual host 2021-02-16 23:52:25 -08:00
Tom Moor
54bf7a9dea fix: Restore specifying AWS endpoint for non-S3 support 2021-02-16 23:41:39 -08:00
Tom Moor
a81a18b173 fix: Remove hard-coded ServerSideEncryption on AWS, configure on AWS or storage provider 2021-02-16 00:16:23 -08:00
Tom Moor
6fa760688b
fix: Adds support for VirtualHost style AWS S3 buckets (#1847)
* Bump aws-sdk

* support virtual host buckets

* fix

* fix: VirtualHost bucket without explicit AWS_S3_FORCE_PATH_STYLE=false
2021-01-27 07:46:43 -08:00
Tom Moor
117d278d16 fix: Deprecated Buffer usage, closes #1726 2020-12-19 15:58:21 -08:00
Tom Moor
2c1a111dee
feat: Support importing .docx or .html files as new documents (#1551)
* Support importing .docx as new documents

* Add html file support, build types and interface for easily adding file types to importer

* fix: Upload embedded images in docx to storage

* refactor: Bulk of logic to command

* refactor: Do all importing on server, so we're not splitting logic for import into two places

* test: Add documentImporter tests


Co-authored-by: Lance Whatley <whatl3y@gmail.com>
2020-09-16 21:54:33 -07:00
Tom Moor
76279902f9
chore: Introduce AWS_S3_FORCE_PATH_STYLE option to maintain compatability with Minio et al (#1443)
- Make AWS_S3_UPLOAD_BUCKET_NAME optional
2020-08-24 23:27:10 -07:00
Tom Moor
449dc55aaa
chore: Upgrade Babel, Jest, Eslint (#1437)
* chore: Upgrade Prettier 1.8 -> 2.0

* chore: Upgrade Babel 6 -> 7

* chore: Upgrade eslint plugins

* chore: Add eslint import/order rules

* chore: Update flow-typed deps
2020-08-08 22:53:59 -07:00
Tom Moor
f43deb7940
chore: Move to prettier standard double quotes (#1309) 2020-06-20 13:59:15 -07:00
Tom Moor
187be4737e fix: Log errors to console when Sentry not installed 2020-04-25 19:53:24 -07:00
Tom Moor
09dea295a2
fix: Cleanup S3 Attachments (#1217)
* fix: Server error if attempting to load an unknown attachment

* fix: Migration should cascade delete to document attachments

* fix: Delete S3 attachments along with documents
2020-03-28 15:56:01 -07:00
Tom Moor
c15cbd06a4
chore: Bugsnag -> Sentry (#1178)
* Bugsnag -> Sentry

* fix: Import style
2020-02-16 22:58:50 -08:00
Huss
8e2b19dc7a
feat: private content (#1137)
* save images as private and serve via signed url from images.info api

* download private images to directory on export

* fix lint errors

* private s3 default, AWS.s3 module level scope, default s3 url expiry

* combine regex to one, and only replace when there are matches

* fix lint

* code not needed anymore, remove

* updates after pulling master

* revert the uploadToS3FromUrl url return

* use model gettr to compact code, rename to attachments api

* basic checking of document read permission to allow attachment viewing

* fix: Continue to upload avatars as public
fix: Allow redirect for non-private attachments

* add support for publicly shared documents

* catch errors which crash the app during zip export and user creation

* add tests

* enable AWS signature v4 for s3

* switch to use factories to build models for testing

* add isDocker flag for local serving of attachment redirect url

* fix redirect tests

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-02-12 19:40:44 -08:00
Himanshu Agarwal
0079593446 Fix: Now supports AWS signature version 4. (#949)
* intial commiy

* cleaning code

* added makeCredential to s3.js and removed extra module dependecy

* lint fixes

* minor fix

* minor fixes

* changed encoding type from string to any

* added new env var to env.sample
2019-06-19 00:33:38 -07:00
Roman Shtylman
aadea856c3 server: fix content-length-range s3 uplaod policy
The max size should be an integer rather than a string (environment variables
are strings). More strict s3 implementations reject the upload because they do
not consider the policy valid if a string is used rather than an integer.
2018-10-19 18:09:44 -07:00
Tom Moor
466033964f Closes #482 2018-06-02 19:00:16 -04:00
Tom Moor
4c9f86c7f7 Save avatars to le cloud in beforeSave hooks
Added encryption to uploads
Updated icon for team settings
2018-06-01 18:00:48 -04:00
Tom Moor
16a6c3bffe Remove moment 2018-03-06 20:31:12 -08:00
Tom Moor
ced80b6723 FakeS3 support 2017-12-10 22:58:52 -08:00
Tom Moor
ec86b9fe8c Update sample .env
Update README to reflect new process
2017-12-10 17:38:56 -08:00
Jori Lallo
1fdbf256a7 review comments 2017-10-19 23:30:31 -07:00
Jori Lallo
c1a8e15a52 flow 2017-10-19 23:00:40 -07:00
Jori Lallo
255d7564c5 Upload avatar to s3 on login 2017-10-19 00:49:22 -07:00
Jori Lallo
08b1609440 [chore] added prettier 2017-04-26 21:47:03 -07:00
Jori Lallo
73f22235d2 Removed debug statements 2016-05-19 23:53:55 -07:00
Jori Lallo
99a59ceb94 Implemented s3 uploading 2016-05-19 23:51:22 -07:00