diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE index 31a24edc..d2be8f20 100644 --- a/.github/ISSUE_TEMPLATE +++ b/.github/ISSUE_TEMPLATE @@ -4,7 +4,7 @@ - Version of `Meteor` you're experiencing this issue - Where this issue appears? OS (Mac/Win/Linux)? Browser name and its version? - Is it *Client* or *Server* issue? - - Post *Client* and/or *Server* logs with enabled `debug` option, you can enable "debug" mode in [*Constructor*](https://github.com/VeliovGroup/Meteor-Files/wiki/Constructor) + - Post *Client* and/or *Server* logs with enabled `debug` option, you can enable "debug" mode in [*Constructor*](https://github.com/veliovgroup/Meteor-Files/wiki/Constructor) ### I had an issue and I've solved it on my own: - Provide a description of steps that you've followed to solve the problem diff --git a/.versions b/.versions index b527ccc7..ad710d0e 100644 --- a/.versions +++ b/.versions @@ -1,51 +1,51 @@ -allow-deny@1.1.0 -babel-compiler@7.6.0 -babel-runtime@1.5.0 +allow-deny@1.1.1 +babel-compiler@7.9.0 +babel-runtime@1.5.1 base64@1.0.12 binary-heap@1.0.11 boilerplate-generator@1.7.1 -callback-hook@1.3.0 +callback-hook@1.4.0 check@1.3.1 ddp@1.4.0 -ddp-client@2.4.0 +ddp-client@2.5.0 ddp-common@1.4.0 -ddp-server@2.3.2 +ddp-server@2.5.0 diff-sequence@1.1.1 -dynamic-import@0.6.0 -ecmascript@0.15.0 -ecmascript-runtime@0.7.0 -ecmascript-runtime-client@0.11.0 -ecmascript-runtime-server@0.10.0 -ejson@1.1.1 +dynamic-import@0.7.2 +ecmascript@0.16.2 +ecmascript-runtime@0.8.0 +ecmascript-runtime-client@0.12.1 +ecmascript-runtime-server@0.11.0 +ejson@1.1.2 fetch@0.1.1 geojson-utils@1.0.10 -id-map@1.1.0 +id-map@1.1.1 inter-process-messaging@0.1.1 -local-test:ostrio:files@2.0.1 -logging@1.2.0 -meteor@1.9.3 -minimongo@1.6.1 -modern-browsers@0.1.5 -modules@0.16.0 -modules-runtime@0.12.0 -mongo@1.10.1 -mongo-decimal@0.1.2 +local-test:ostrio:files@2.1.0 +logging@1.3.1 +meteor@1.10.0 +minimongo@1.8.0 +modern-browsers@0.1.8 +modules@0.18.0 +modules-runtime@0.13.0 +mongo@1.15.0 +mongo-decimal@0.1.3 mongo-dev-server@1.1.0 -mongo-id@1.0.7 -npm-mongo@3.8.1 +mongo-id@1.0.8 +npm-mongo@4.3.1 ordered-dict@1.1.0 -ostrio:cookies@2.7.0 -ostrio:files@2.0.1 -promise@0.11.2 +ostrio:cookies@2.7.2 +ostrio:files@2.1.0 +promise@0.12.0 random@1.2.0 -react-fast-refresh@0.1.0 +react-fast-refresh@0.2.3 reactive-var@1.0.11 reload@1.3.1 retry@1.1.0 -routepolicy@1.1.0 -socket-stream-client@0.3.1 -tinytest@1.1.0 +routepolicy@1.1.1 +socket-stream-client@0.5.0 +tinytest@1.2.1 tracker@1.2.0 underscore@1.0.10 -webapp@1.10.0 +webapp@1.13.1 webapp-hashing@1.1.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f99ebdd..cda11329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -For full changelog see [releases on GitHub](https://github.com/VeliovGroup/Meteor-Files/releases) \ No newline at end of file +For full changelog see [releases on GitHub](https://github.com/veliovgroup/Meteor-Files/releases) \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9509606..29f6de0c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ ### I'm having an issue: - 1. Search [issues](https://github.com/VeliovGroup/Meteor-Files/issues), maybe your issue is already solved - 2. We have useful threads marked as [`In a case of the fire - Read This`](https://github.com/VeliovGroup/Meteor-Files/issues?utf8=✓&q=label%3A%22In%20a%20case%20of%20the%20fire%20-%20Read%20This%22), read them too + 1. Search [issues](https://github.com/veliovgroup/Meteor-Files/issues), maybe your issue is already solved + 2. We have useful threads marked as [`In a case of the fire - Read This`](https://github.com/veliovgroup/Meteor-Files/issues?utf8=✓&q=label%3A%22In%20a%20case%20of%20the%20fire%20-%20Read%20This%22), read them too 3. Before submitting an issue make sure it's only related to `Meteor-Files` package 4. If your issue is not solved: - Give an expressive description of what is went wrong @@ -8,23 +8,23 @@ - Version of `Meteor` you're experiencing this issue - Where this issue appears? OS (Mac/Win/Linux)? Browser name and its version? - Is it *Client* or *Server* issue? - - Post *Client* and/or *Server* logs with enabled `debug` option, you can enable "debug" mode in [*Constructor*](https://github.com/VeliovGroup/Meteor-Files/wiki/Constructor) + - Post *Client* and/or *Server* logs with enabled `debug` option, you can enable "debug" mode in [*Constructor*](https://github.com/veliovgroup/Meteor-Files/wiki/Constructor) ### I had an issue and I've solved it on my own: - Provide a description of steps that you've followed to solve the problem - Provide links to websites and/or pages with the information that helped you (*if there are any*) ### I have a suggestion: - 1. PRs are always welcome - [send a PR](https://github.com/VeliovGroup/Meteor-Files/compare) - - Always send PRs only to [`dev` branch](https://github.com/VeliovGroup/Meteor-Files/compare/dev), thank you + 1. PRs are always welcome - [send a PR](https://github.com/veliovgroup/Meteor-Files/compare) + - Always send PRs only to [`dev` branch](https://github.com/veliovgroup/Meteor-Files/compare/dev), thank you 2. If you're can not send a PR for some reason: - Create a new issue ticket - Describe your feature / request - How you going to use it? Give a usage example(s) ### Documentation is missing something or incorrect (have typos, etc.): - 1. PRs are always welcome - [send a PR](https://github.com/VeliovGroup/Meteor-Files/compare) - - Always send PRs only to [`dev` branch](https://github.com/VeliovGroup/Meteor-Files/compare/dev), thank you + 1. PRs are always welcome - [send a PR](https://github.com/veliovgroup/Meteor-Files/compare) + - Always send PRs only to [`dev` branch](https://github.com/veliovgroup/Meteor-Files/compare/dev), thank you 2. If you're can not send a PR to docs for some reason: - Create a new issue ticket - Give an expressive description what you have changed/added and why diff --git a/HISTORY.md b/HISTORY.md index 446485e5..384c24bb 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1 +1 @@ -For full package history see [releases on GitHub](https://github.com/VeliovGroup/Meteor-Files/releases) \ No newline at end of file +For full package history see [releases on GitHub](https://github.com/veliovgroup/Meteor-Files/releases) \ No newline at end of file diff --git a/LICENSE b/LICENSE index aa54073c..6bd2bc33 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2021, dr.dimitru (Dmitry A.; Veliov Group, LLC) +Copyright (c) 2022, dr.dimitru (Dmitry A.; Veliov Group, LLC) All rights reserved. Redistribution and use in source and binary forms, diff --git a/README.md b/README.md index 9d323c5d..8ef8e4e9 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,48 @@ [![support](https://img.shields.io/badge/support-GitHub-white)](https://github.com/sponsors/dr-dimitru) [![support](https://img.shields.io/badge/support-PayPal-white)](https://paypal.me/veliovgroup) [![Mentioned in Awesome ostrio:files](https://awesome.re/mentioned-badge.svg)](https://project-awesome.org/Urigo/awesome-meteor#files) -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/VeliovGroup/Meteor-Files) -[![GitHub stars](https://img.shields.io/github/stars/VeliovGroup/Meteor-Files.svg)](https://github.com/VeliovGroup/Meteor-Files/stargazers) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/veliovgroup/Meteor-Files) +[![GitHub stars](https://img.shields.io/github/stars/veliovgroup/Meteor-Files.svg)](https://github.com/veliovgroup/Meteor-Files/stargazers) # Files for Meteor.js -Stable, fast, robust, and well-maintained Meteor.js package for files management using MongoDB Collection API. What does exactly this means? Calling [`.insert()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/insert.md) method would initiate a file upload and then insert new record into collection. Calling [`.remove()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/remove.md) method would erase stored file and record from MongoDB Collection. And so on, no need to learn new APIs. It's flavored with extra low-level methods like [`.unlink()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/unlink.md) and [`.write()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/write.md) for complex integrations. +Stable, fast, robust, and well-maintained Meteor.js package for files management using MongoDB Collection API. What does exactly this means? Calling [`.insert()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/insert.md) method would initiate a file upload and then insert new record into collection. Calling [`.remove()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/remove.md) method would erase stored file and record from MongoDB Collection. And so on, no need to learn new APIs. It's flavored with extra low-level methods like [`.unlink()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/unlink.md) and [`.write()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/write.md) for complex integrations. ## ToC: -- [Wiki](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/toc.md) - Full documentation -- [Installation](https://github.com/VeliovGroup/Meteor-Files#installation) - - [ES6 Import](https://github.com/VeliovGroup/Meteor-Files#es6-import) -- [API](https://github.com/VeliovGroup/Meteor-Files#api-overview-full-api): - - [Initialize Collection](https://github.com/VeliovGroup/Meteor-Files#new-filescollectionconfig-isomorphic) - - [Upload file](https://github.com/VeliovGroup/Meteor-Files#insertsettings-autostart-client) - - [Stream files](https://github.com/VeliovGroup/Meteor-Files#stream-files) - - [Download Button](https://github.com/VeliovGroup/Meteor-Files#download-button) -- [Documentation and tutorials](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/toc.md) - - [__Demo apps and examples__](https://github.com/VeliovGroup/Meteor-Files#demo-application) - - [3rd-party storage integration](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/3rd-party-storage.md) examples - AWS S3, DropBox, GridFS and Google Storage - - [TypeScript Definitions](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/typescript-definitions.md) -- [Related Packages](https://github.com/VeliovGroup/Meteor-Files#related-packages) -- [Why this package?](https://github.com/VeliovGroup/Meteor-Files#why-meteor-files) -- [Help / Support](https://github.com/VeliovGroup/Meteor-Files#get-support) -- [FAQ](https://github.com/VeliovGroup/Meteor-Files#faq) -- [Awards](https://github.com/VeliovGroup/Meteor-Files#awards) -- [Help & Contribute](https://github.com/VeliovGroup/Meteor-Files#contribution) -- [Support this project](https://github.com/VeliovGroup/Meteor-Files#support-meteor-files-project) -- [Supporters](https://github.com/VeliovGroup/Meteor-Files#supporters) +- [Wiki](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/toc.md) - Full documentation +- [Installation](https://github.com/veliovgroup/Meteor-Files#installation) + - [ES6 Import](https://github.com/veliovgroup/Meteor-Files#es6-import) +- [API](https://github.com/veliovgroup/Meteor-Files#api-overview-full-api): + - [Initialize Collection](https://github.com/veliovgroup/Meteor-Files#new-filescollectionconfig-isomorphic) + - [Upload file](https://github.com/veliovgroup/Meteor-Files#insertsettings-autostart-client) + - [Stream files](https://github.com/veliovgroup/Meteor-Files#stream-files) + - [Download Button](https://github.com/veliovgroup/Meteor-Files#download-button) +- [Documentation and tutorials](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/toc.md) + - [__Demo apps and examples__](https://github.com/veliovgroup/Meteor-Files#demo-application) + - [3rd-party storage integration](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/3rd-party-storage.md) examples - AWS S3, DropBox, GridFS and Google Storage + - [TypeScript Definitions](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/typescript-definitions.md) +- [Related Packages](https://github.com/veliovgroup/Meteor-Files#related-packages) +- [Why this package?](https://github.com/veliovgroup/Meteor-Files#why-meteor-files) +- [Help / Support](https://github.com/veliovgroup/Meteor-Files#get-support) +- [FAQ](https://github.com/veliovgroup/Meteor-Files#faq) +- [Awards](https://github.com/veliovgroup/Meteor-Files#awards) +- [Help & Contribute](https://github.com/veliovgroup/Meteor-Files#contribution) +- [Support this project](https://github.com/veliovgroup/Meteor-Files#support-meteor-files-project) +- [Supporters](https://github.com/veliovgroup/Meteor-Files#supporters) ## Why `Meteor-Files`? -- Compatible with all front-end frameworks from Blaze to [React](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/react-example.md) -- Upload via `HTTP` and `DDP` transports, [read about difference](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/about-transports.md) +- Compatible with all front-end frameworks from Blaze to [React](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/react-example.md) +- Upload via `HTTP` and `DDP` transports, [read about difference](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/about-transports.md) - Sustainable and resumable uploads, which will survive connection interruption and server reboot (*if a server has persistent storage*) - Upload files through computing cloud without persistent File System, like Heroku -- You need store files at *[GridFS](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md#use-gridfs-with-gridfsbucket-as-a-storage)*, *[AWS S3](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/aws-s3-integration.md)*, *[Google Storage](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/google-cloud-storage-integration.md)* or *[DropBox](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/dropbox-integration.md)*? (*[Use 3rd-party storage](hhttps://github.com/VeliovGroup/Meteor-Files/blob/master/docs/3rd-party-storage.md)*) -- You need to check file mime-type, size or extension? Easy! Use *[`onBeforeUpload`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md)* hook -- You need to [resize images](https://github.com/VeliovGroup/Meteor-Files-Demos/blob/master/demo/imports/server/image-processing.js#L19) after upload? Easy too! Use *[`onAfterUpload`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md)* hook, and *[manage file's subversions](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/file-subversions.md)* in a single record +- You need store files at *[GridFS](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md#use-gridfs-with-gridfsbucket-as-a-storage)*, *[AWS S3](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/aws-s3-integration.md)*, *[Google Storage](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/google-cloud-storage-integration.md)* or *[DropBox](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/dropbox-integration.md)*? (*[Use 3rd-party storage](hhttps://github.com/veliovgroup/Meteor-Files/blob/master/docs/3rd-party-storage.md)*) +- You need to check file mime-type, size or extension? Easy! Use *[`onBeforeUpload`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md)* hook +- You need to [resize images](https://github.com/veliovgroup/Meteor-Files-Demos/blob/master/demo/imports/server/image-processing.js#L19) after upload? Easy too! Use *[`onAfterUpload`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md)* hook, and *[manage file's subversions](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/file-subversions.md)* in a single record ## Installation: @@ -56,11 +56,11 @@ meteor add ostrio:files import { FilesCollection } from 'meteor/ostrio:files'; ``` -## API overview (*[full API](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/readme.md)*) +## API overview (*[full API](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/readme.md)*) ### `new FilesCollection([config])` [*Isomorphic*] -Read full docs for [`FilesCollection` Constructor](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md) +Read full docs for [`FilesCollection` Constructor](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md) Shared code: @@ -93,7 +93,7 @@ if (Meteor.isServer) { ### `insert(settings[, autoStart])` [*Client*] -Read full docs for [`insert()` method](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/insert.md) +Read full docs for [`insert()` method](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/insert.md) Upload form (template): @@ -160,7 +160,7 @@ Template.uploadForm.events({ }); ``` -For multiple file upload see [this demo code](https://github.com/VeliovGroup/Meteor-Files-Demos/blob/master/demo/imports/client/upload/upload-form.js#L73). +For multiple file upload see [this demo code](https://github.com/veliovgroup/meteor-files-website/blob/master/imports/client/upload/upload-form.js#L130). Upload base64 string (*introduced in v1.7.1*): @@ -181,7 +181,7 @@ Images.insert({ }); ``` -For more expressive example see [Upload demo app](https://github.com/VeliovGroup/Meteor-Files-Demos/tree/master/demo-simplest-upload) +For more expressive example see [Upload demo app](https://github.com/veliovgroup/Meteor-Files-Demos/tree/master/demo-simplest-upload) ### Stream files @@ -215,7 +215,7 @@ const Videos = new FilesCollection({collectionName: 'Videos'}); if (Meteor.isServer) { // Upload sample files on server's startup: Meteor.startup(() => { - Images.load('https://raw.githubusercontent.com/VeliovGroup/Meteor-Files/master/logo.png', { + Images.load('https://raw.githubusercontent.com/veliovgroup/Meteor-Files/master/logo.png', { fileName: 'logo.png' }); Videos.load('http://www.sample-videos.com/video/mp4/240/big_buck_bunny_240p_5mb.mp4', { @@ -250,7 +250,7 @@ Template.file.helpers({ }); ``` -For more expressive example see [Streaming demo app](https://github.com/VeliovGroup/Meteor-Files-Demos/tree/master/demo-simplest-streaming) +For more expressive example see [Streaming demo app](https://github.com/veliovgroup/Meteor-Files-Demos/tree/master/demo-simplest-streaming) ### Download button @@ -274,7 +274,7 @@ const Images = new FilesCollection({collectionName: 'Images'}); if (Meteor.isServer) { // Load sample image into FilesCollection on server's startup: Meteor.startup(function () { - Images.load('https://raw.githubusercontent.com/VeliovGroup/Meteor-Files/master/logo.png', { + Images.load('https://raw.githubusercontent.com/veliovgroup/Meteor-Files/master/logo.png', { fileName: 'logo.png', meta: {} }); @@ -299,33 +299,33 @@ Template.file.helpers({ }); ``` -For more expressive example see [Download demo](https://github.com/VeliovGroup/Meteor-Files-Demos/tree/master/demo-simplest-download-button) +For more expressive example see [Download demo](https://github.com/veliovgroup/Meteor-Files-Demos/tree/master/demo-simplest-download-button) ## FAQ: -1. __Where are files stored by default?__: by default if `config.storagePath` isn't passed into [*Constructor*](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md) it's equals to `assets/app/uploads` and relative to running script: +1. __Where are files stored by default?__: by default if `config.storagePath` isn't passed into [*Constructor*](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md) it's equals to `assets/app/uploads` and relative to running script: - __a.__ On `development` stage: `yourDevAppDir/.meteor/local/build/programs/server`. __Note: All files will be removed as soon as your application rebuilds__ or you run `meteor reset`. To keep your storage persistent during development use an absolute path *outside of your project folder*, e.g. `/data` directory. - - __b.__ On `production`: `yourProdAppDir/programs/server`. __Note: If using MeteorUp (MUP), Docker volumes must to be added to__ `mup.json`, see [MUP usage](hhttps://github.com/VeliovGroup/Meteor-Files/blob/master/docs/meteorup-usage.md) -2. __Cordova usage and development__: With support of community we do regular testing on virtual and real devices. To make sure `Meteor-Files` library runs smoothly in Cordova environment — enable [withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials); enable `{allowQueryStringCookies: true}` and `{allowedOrigins: true}` on both `Client` and `Server`. For more details read [Cookie's repository FAQ](https://github.com/VeliovGroup/Meteor-Cookies#faq) -3. __How to pause/continue upload and get progress/speed/remaining time?__: see *Object* returned from [`insert` method](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/insert.md) + - __b.__ On `production`: `yourProdAppDir/programs/server`. __Note: If using MeteorUp (MUP), Docker volumes must to be added to__ `mup.json`, see [MUP usage](hhttps://github.com/veliovgroup/Meteor-Files/blob/master/docs/meteorup-usage.md) +2. __Cordova usage and development__: With support of community we do regular testing on virtual and real devices. To make sure `Meteor-Files` library runs smoothly in Cordova environment — enable [withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials); enable `{allowQueryStringCookies: true}` and `{allowedOrigins: true}` on both `Client` and `Server`. For more details read [Cookie's repository FAQ](https://github.com/veliovgroup/Meteor-Cookies#faq) +3. __How to pause/continue upload and get progress/speed/remaining time?__: see *Object* returned from [`insert` method](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/insert.md) 4. When using any of `accounts` packages - package `accounts-base` must be explicitly added to `.meteor/packages` above `ostrio:files` 5. __cURL/POST uploads__ - Take a look on [POST-Example](https://github.com/noris666/Meteor-Files-POST-Example) by [@noris666](https://github.com/noris666) -6. In __Safari__ (Mobile and Desktop) for `DDP` chunk size is reduced by algorithm, due to error thrown if frame is too big. Limit simultaneous uploads to `6` is recommended for Safari. This issue should be fixed in Safari 11. Switching to `http` transport (*which has no such issue*) is recommended for Safari. See [#458](https://github.com/VeliovGroup/Meteor-Files/issues/458) -7. Make sure you're using single domain for the Meteor app, and the same domain for hosting Meteor-Files endpoints, see [#737](https://github.com/VeliovGroup/Meteor-Files/issues/737) for details -8. When proxying requests to Meteor-Files endpoint make sure protocol `http/1.1` is used, see [#742](https://github.com/VeliovGroup/Meteor-Files/issues/742) for details +6. In __Safari__ (Mobile and Desktop) for `DDP` chunk size is reduced by algorithm, due to error thrown if frame is too big. Limit simultaneous uploads to `6` is recommended for Safari. This issue should be fixed in Safari 11. Switching to `http` transport (*which has no such issue*) is recommended for Safari. See [#458](https://github.com/veliovgroup/Meteor-Files/issues/458) +7. Make sure you're using single domain for the Meteor app, and the same domain for hosting Meteor-Files endpoints, see [#737](https://github.com/veliovgroup/Meteor-Files/issues/737) for details +8. When proxying requests to Meteor-Files endpoint make sure protocol `http/1.1` is used, see [#742](https://github.com/veliovgroup/Meteor-Files/issues/742) for details ## Awards: - + ## Get Support: -- [Ask a question via Gitter chat](https://gitter.im/VeliovGroup/Meteor-Files) -- [Ask a question or submit an issue](https://github.com/VeliovGroup/Meteor-Files/issues) -- [Releases / Changelog / History](https://github.com/VeliovGroup/Meteor-Files/releases) -- For more docs and examples [read wiki](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/readme.md) +- [Ask a question via Gitter chat](https://gitter.im/veliovgroup/Meteor-Files) +- [Ask a question or submit an issue](https://github.com/veliovgroup/Meteor-Files/issues) +- [Releases / Changelog / History](https://github.com/veliovgroup/Meteor-Files/releases) +- For more docs and examples [read wiki](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/readme.md) ## Demo application: @@ -334,12 +334,12 @@ For more expressive example see [Download demo](https://github.com/VeliovGroup/M ## Related Packages: -- [pyfiles (meteor-python-files)](https://github.com/VeliovGroup/meteor-python-files) Python Client for Meteor-Files package -- [meteor-autoform-file](https://github.com/VeliovGroup/meteor-autoform-file) - Upload and manage files with [autoForm](https://github.com/aldeed/meteor-autoform) +- [pyfiles (meteor-python-files)](https://github.com/veliovgroup/meteor-python-files) Python Client for Meteor-Files package +- [meteor-autoform-file](https://github.com/veliovgroup/meteor-autoform-file) - Upload and manage files with [autoForm](https://github.com/aldeed/meteor-autoform) ## Support Meteor-Files project: -- Star on [GitHub](https://github.com/VeliovGroup/Meteor-Files) +- Star on [GitHub](https://github.com/veliovgroup/Meteor-Files) - Star on [Atmosphere](https://atmospherejs.com/ostrio/files) - Share via [Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fgithub.com%2FVeliovGroup%2FMeteor-Files) and [Twitter](https://twitter.com/share?url=https%3A%2F%2Fgithub.com%2FVeliovGroup%2FMeteor-Files) - [Sponsor via GitHub](https://github.com/sponsors/dr-dimitru) @@ -348,8 +348,8 @@ For more expressive example see [Download demo](https://github.com/VeliovGroup/M ## Contribution: -- __Want to help?__ Please check [issues](https://github.com/VeliovGroup/Meteor-Files/issues) for open and tagged as [`help wanted` issues](https://github.com/VeliovGroup/Meteor-Files/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted"); -- __Want to contribute?__ Read and follow [PR rules](https://github.com/VeliovGroup/Meteor-Files/blob/master/.github/PULL_REQUEST_TEMPLATE). All PRs are welcome on [`dev` branch](https://github.com/VeliovGroup/Meteor-Files/tree/dev). Please, always give expressive description to your changes and additions. +- __Want to help?__ Please check [issues](https://github.com/veliovgroup/Meteor-Files/issues) for open and tagged as [`help wanted` issues](https://github.com/veliovgroup/Meteor-Files/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted"); +- __Want to contribute?__ Read and follow [PR rules](https://github.com/veliovgroup/Meteor-Files/blob/master/.github/PULL_REQUEST_TEMPLATE). All PRs are welcome on [`dev` branch](https://github.com/veliovgroup/Meteor-Files/tree/dev). Please, always give expressive description to your changes and additions. ## Supporters: diff --git a/client.js b/client.js index ff43bd5f..756fa80b 100644 --- a/client.js +++ b/client.js @@ -113,7 +113,6 @@ export class FilesCollection extends FilesCollectionCore { } if (!config.disableSetTokenCookie) { - const setTokenCookie = () => { if (Meteor.connection._lastSessionId) { cookie.set('x_mtok', Meteor.connection._lastSessionId, { path: '/', sameSite: 'Lax' }); @@ -123,14 +122,14 @@ export class FilesCollection extends FilesCollectionCore { } }; - if (typeof Accounts !== 'undefined' && Accounts !== null) { + const _accounts = (Package && Package['accounts-base'] && Package['accounts-base'].Accounts) ? Package['accounts-base'].Accounts : undefined; + if (_accounts) { DDP.onReconnect((conn) => { conn.onReconnect = setTokenCookie; }); Meteor.startup(setTokenCookie); - Accounts.onLogin(setTokenCookie); + _accounts.onLogin(setTokenCookie); } - } check(this.onbeforeunloadMessage, Match.OneOf(String, Function)); @@ -225,7 +224,7 @@ export class FilesCollection extends FilesCollectionCore { * @see https://developer.mozilla.org/en-US/docs/Web/API/FileReader * @param {Object} config - Configuration object with next properties: * {File|Object} file - HTML5 `files` item, like in change event: `e.currentTarget.files[0]` - * {String} fileId - Optionnal `fileId` used at insert + * {String} fileId - Optional `fileId` used at insert * {Object} meta - Additional data as object, use later for search * {Boolean} allowWebWorkers- Allow/Deny WebWorkers usage * {Number|dynamic} chunkSize - Chunk size for upload @@ -289,21 +288,22 @@ export class FilesCollection extends FilesCollectionCore { * @name fileURL * @param {Object} fileRef - File reference object * @param {String} version - [Optional] Version of file you would like to request - * @param {String} URIBase - [Optional] URI base, see - https://github.com/VeliovGroup/Meteor-Files/issues/626 + * @param {String} uriBase - [Optional] URI base, see - https://github.com/veliovgroup/Meteor-Files/issues/626 * @summary Get download URL for file by fileRef, even without subscription * @example {{fileURL fileRef}} * @returns {String} */ Meteor.startup(() => { - if (typeof Template !== 'undefined' && Template !== null) { - Template.registerHelper('fileURL', (fileRef, _version = 'original', _URIBase) => { + const _template = (Package && Package.templating && Package.templating.Template) ? Package.templating.Template : undefined; + if (_template) { + _template.registerHelper('fileURL', (fileRef, _version = 'original', _uriBase) => { if (!helpers.isObject(fileRef)) { return ''; } const version = (!helpers.isString(_version)) ? 'original' : _version; - const URIBase = (!helpers.isString(_URIBase)) ? void 0 : _URIBase; - return formatFleURL(fileRef, version, URIBase); + const uriBase = (!helpers.isString(_uriBase)) ? void 0 : _uriBase; + return formatFleURL(fileRef, version, uriBase); }); } }); diff --git a/core.js b/core.js index a0209df0..dd803d35 100644 --- a/core.js +++ b/core.js @@ -135,7 +135,7 @@ export default class FilesCollectionCore extends EventEmitter { */ _getExt(fileName) { if (fileName.includes('.')) { - const extension = (fileName.split('.').pop().split('?')[0] || '').toLowerCase(); + const extension = (fileName.split('.').pop().split('?')[0] || '').toLowerCase().replace(/([^a-z0-9\-\_\.]+)/gi, '').substring(0, 20); return { ext: extension, extension, extensionWithDot: `.${extension}` }; } return { ext: '', extension: '', extensionWithDot: '' }; @@ -170,7 +170,7 @@ export default class FilesCollectionCore extends EventEmitter { name: data.name, extension: data.extension, ext: data.extension, - extensionWithDot: '.' + data.extension, + extensionWithDot: `.${data.extension}`, path: data.path, meta: data.meta, type: data.type, @@ -257,17 +257,17 @@ export default class FilesCollectionCore extends EventEmitter { * @name link * @param {Object} fileRef - File reference object * @param {String} version - Version of file you would like to request - * @param {String} URIBase - [Optional] URI base, see - https://github.com/VeliovGroup/Meteor-Files/issues/626 + * @param {String} uriBase - [Optional] URI base, see - https://github.com/veliovgroup/Meteor-Files/issues/626 * @summary Returns downloadable URL * @returns {String} Empty string returned in case if file not found in DB */ - link(fileRef, version = 'original', URIBase) { + link(fileRef, version = 'original', uriBase) { this._debug(`[FilesCollection] [link(${(helpers.isObject(fileRef) ? fileRef._id : void 0)}, ${version})]`); check(fileRef, Object); if (!fileRef) { return ''; } - return formatFleURL(fileRef, version, URIBase); + return formatFleURL(fileRef, version, uriBase); } } diff --git a/cursor.js b/cursor.js index 689903bf..d7583db8 100644 --- a/cursor.js +++ b/cursor.js @@ -10,7 +10,7 @@ import { Meteor } from 'meteor/meteor'; */ export class FileCursor { constructor(_fileRef, _collection) { - this._fileRef = _fileRef; + this._fileRef = _fileRef; this._collection = _collection; Object.assign(this, _fileRef); } @@ -38,14 +38,14 @@ export class FileCursor { * @memberOf FileCursor * @name link * @param version {String} - Name of file's subversion - * @param URIBase {String} - [Optional] URI base, see - https://github.com/VeliovGroup/Meteor-Files/issues/626 + * @param uriBase {String} - [Optional] URI base, see - https://github.com/veliovgroup/Meteor-Files/issues/626 * @summary Returns downloadable URL to File * @returns {String} */ - link(version = 'original', URIBase) { + link(version = 'original', uriBase) { this._collection._debug(`[FilesCollection] [FileCursor] [link(${version})]`); if (this._fileRef) { - return this._collection.link(this._fileRef, version, URIBase); + return this._collection.link(this._fileRef, version, uriBase); } return ''; } @@ -103,9 +103,9 @@ export class FileCursor { export class FilesCursor { constructor(_selector = {}, options, _collection) { this._collection = _collection; - this._selector = _selector; - this._current = -1; - this.cursor = this._collection.collection.find(this._selector, options); + this._selector = _selector; + this._current = -1; + this.cursor = this._collection.collection.find(this._selector, options); } /* diff --git a/demo-simplest-download-button/README.md b/demo-simplest-download-button/README.md index 6f78f483..3f48e456 100644 --- a/demo-simplest-download-button/README.md +++ b/demo-simplest-download-button/README.md @@ -1,4 +1,4 @@ 301 ======== -Moved to [Meteor-Files-Demos](https://github.com/VeliovGroup/Meteor-Files-Demos) repository \ No newline at end of file +Moved to [Meteor-Files-Demos](https://github.com/veliovgroup/Meteor-Files-Demos) repository \ No newline at end of file diff --git a/demo-simplest-streaming/README.md b/demo-simplest-streaming/README.md index 6f78f483..3f48e456 100644 --- a/demo-simplest-streaming/README.md +++ b/demo-simplest-streaming/README.md @@ -1,4 +1,4 @@ 301 ======== -Moved to [Meteor-Files-Demos](https://github.com/VeliovGroup/Meteor-Files-Demos) repository \ No newline at end of file +Moved to [Meteor-Files-Demos](https://github.com/veliovgroup/Meteor-Files-Demos) repository \ No newline at end of file diff --git a/demo-simplest-upload/README.md b/demo-simplest-upload/README.md index 6f78f483..3f48e456 100644 --- a/demo-simplest-upload/README.md +++ b/demo-simplest-upload/README.md @@ -1,4 +1,4 @@ 301 ======== -Moved to [Meteor-Files-Demos](https://github.com/VeliovGroup/Meteor-Files-Demos) repository \ No newline at end of file +Moved to [Meteor-Files-Demos](https://github.com/veliovgroup/Meteor-Files-Demos) repository \ No newline at end of file diff --git a/demo/README.md b/demo/README.md index 6f78f483..3f48e456 100644 --- a/demo/README.md +++ b/demo/README.md @@ -1,4 +1,4 @@ 301 ======== -Moved to [Meteor-Files-Demos](https://github.com/VeliovGroup/Meteor-Files-Demos) repository \ No newline at end of file +Moved to [Meteor-Files-Demos](https://github.com/veliovgroup/Meteor-Files-Demos) repository \ No newline at end of file diff --git a/docs/3rd-party-storage.md b/docs/3rd-party-storage.md index 0a8dfa40..069ffffd 100644 --- a/docs/3rd-party-storage.md +++ b/docs/3rd-party-storage.md @@ -5,10 +5,10 @@ Any 3rd party storage with REST API or Node.js SDK can be easily integrated. __Integration examples:__ -- [AWS S3 Bucket Integration](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/aws-s3-integration.md) -- [DropBox Integration](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/dropbox-integration.md) -- [GridFS using `GridFSBucket`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md#use-gridfs-with-gridfsbucket-as-a-storage) -- [GridFS using `gridfs-stream` (legacy)](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-integration.md) -- [Google Cloud Storage Integration](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/google-cloud-storage-integration.md) +- [AWS S3 Bucket Integration](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/aws-s3-integration.md) +- [DropBox Integration](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/dropbox-integration.md) +- [GridFS using `GridFSBucket`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md#use-gridfs-with-gridfsbucket-as-a-storage) +- [GridFS using `gridfs-stream` (legacy)](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-integration.md) +- [Google Cloud Storage Integration](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/google-cloud-storage-integration.md) -*AWS S3* and *DropBox* is available in [demo app](https://github.com/VeliovGroup/Meteor-Files-Demos/tree/master/demo) out-of-the box +*AWS S3* and *DropBox* is available in [demo app](https://github.com/veliovgroup/Meteor-Files-Demos/tree/master/demo) out-of-the box diff --git a/docs/about-transports.md b/docs/about-transports.md index a12d0203..4a2fc52a 100644 --- a/docs/about-transports.md +++ b/docs/about-transports.md @@ -34,7 +34,7 @@ The cons: ## RTC Data Chanel (UDP) -This transport supported only in [webrtc-data-channel](https://github.com/VeliovGroup/Meteor-Files/tree/webrtc-data-channel) branch. It's in testing mode, we're waiting for community feedback, before merging to `master`. If you're interested in RTC/DC uploads, try this branch locally. Any feedback on RTC/DC usage for uploads is highly appreciated! +This transport supported only in [webrtc-data-channel](https://github.com/veliovgroup/Meteor-Files/tree/webrtc-data-channel) branch. It's in testing mode, we're waiting for community feedback, before merging to `master`. If you're interested in RTC/DC uploads, try this branch locally. Any feedback on RTC/DC usage for uploads is highly appreciated! The pros: diff --git a/docs/constructor.md b/docs/constructor.md index 865dd0e9..b8df784f 100644 --- a/docs/constructor.md +++ b/docs/constructor.md @@ -159,10 +159,10 @@ Allows to change default response headers - Default Function + Default Function - We recommend to keep original function structure, with your modifications, see example altering default headers + We recommend to keep original function structure, with your modifications, see example altering default headers @@ -206,10 +206,10 @@ Collection Schema - Default Schema + Default Schema - For more info read Schema docs + For more info read Schema docs @@ -324,7 +324,7 @@ Arguments:
Context: @@ -363,7 +363,7 @@ Arguments:
@@ -517,7 +517,7 @@ false - See: #208 + See: #208 @@ -1116,7 +1116,7 @@ const Images = new FilesCollection({ #### Use onBeforeRemove to avoid unauthorized remove: -*For more info see [remove method](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/remove.md).* +*For more info see [remove method](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/remove.md).* ```js import { FilesCollection } from 'meteor/ostrio:files'; diff --git a/docs/custom-response-headers.md b/docs/custom-response-headers.md index 68e8d716..dda625ea 100644 --- a/docs/custom-response-headers.md +++ b/docs/custom-response-headers.md @@ -1,6 +1,6 @@ # Custom Response Headers -- `config.responseHeaders` option (*passed into [`FilesCollection` Constructor](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md)*) +- `config.responseHeaders` option (*passed into [`FilesCollection` Constructor](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md)*) *Allows to change default response headers.* diff --git a/docs/find.md b/docs/find.md index fd45352a..ec09e306 100644 --- a/docs/find.md +++ b/docs/find.md @@ -4,7 +4,7 @@ Find and return Cursor for matching documents. - `selector` {*String*|*Object*} - [Mongo-Style selector](http://docs.meteor.com/api/collections.html#selectors) - `options` {*Object*} - [Mongo-Style selector Options](http://docs.meteor.com/api/collections.html#sortspecifiers) -- Returns {*[FilesCursor](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/FilesCursor.md)*} +- Returns {*[FilesCursor](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/FilesCursor.md)*} ```js import { Meteor } from 'meteor/meteor'; diff --git a/docs/findOne.md b/docs/findOne.md index 268b9c41..284f125c 100644 --- a/docs/findOne.md +++ b/docs/findOne.md @@ -4,7 +4,7 @@ Finds the first document that matches the selector, as ordered by sort and skip - `selector` {*String*|*Object*} - [Mongo-Style selector](http://docs.meteor.com/api/collections.html#selectors) - `options` {*Object*} - [Mongo-Style selector Options](http://docs.meteor.com/api/collections.html#sortspecifiers) -- Returns {*[FileCursor](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/FileCursor.md)*} +- Returns {*[FileCursor](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/FileCursor.md)*} ```js import { FilesCollection } from 'meteor/ostrio:files'; diff --git a/docs/gridfs-bucket-integration.md b/docs/gridfs-bucket-integration.md index 34496bb9..14610bd5 100644 --- a/docs/gridfs-bucket-integration.md +++ b/docs/gridfs-bucket-integration.md @@ -2,14 +2,14 @@ This example shows how to handle (store, serve, remove) uploaded files via GridFS. The Javascript Mongo driver (the one that Meteor uses under the hood) allows to define -[so called "Buckets"](http://mongodb.github.io/node-mongodb-native/3.2/api/GridFSBucket.html). +[so called "Buckets"](http://mongodb.github.io/node-mongodb-native/3.6/api/GridFSBucket.html). The Buckets are basically named collections for storing the file's metadata and chunkdata. This allows to *horizontally scale your files* the same way you do with your document collections. **A note for beginners:** This tutorial is a bit advanced and we try to explain the involved steps as detailed as possible. If you still need some reference to play with, we have set up an example project. The project -is available via [`files-gridfs-autoform-example`](https://github.com/VeliovGroup/files-gridfs-autoform-example) +is available via [`files-gridfs-autoform-example`](https://github.com/veliovgroup/files-gridfs-autoform-example) ## About GridFS @@ -25,24 +25,21 @@ plus some additional metadata. Please note - by default all files will be served with `200` response code, which is fine if you planning to deal only with small files, or not planning to serve files back to users (*use only upload and storage*). -For support of `206` partial content see [this article](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-streaming.md). +For support of `206` partial content see [this article](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-streaming.md). ## 1. Create a `GridFSBucket` factory Before we can use a bucket, we need to define it with a given name. This is similar to creating a collection using a name for documents. -In a larger app we will need lots of buckets in order to horizontally scale. -It thus makes sense to create these buckets from a function. - -The following code is such a helper function that can easily be extended to accept more options: +The following code is a helper function to create a bucket. It can easily be extended to accept more options: ```js import { MongoInternals } from 'meteor/mongo'; export const createBucket = (bucketName) => { const options = bucketName ? {bucketName} : (void 0); - return new MongoInternals.NpmModule.GridFSBucket(MongoInternals.defaultRemoteCollectionDriver().mongo.db, options); + return new MongoInternals.NpmModules.mongodb.module.GridFSBucket(MongoInternals.defaultRemoteCollectionDriver().mongo.db, options); } ``` @@ -62,7 +59,7 @@ we also wrap this in a function: ```js import { MongoInternals } from 'meteor/mongo'; -export const createObjectId = ({ gridFsFileId }) => new MongoInternals.NpmModule.ObjectID(gridFsFileId); +export const createObjectId = ({ gridFsFileId }) => new MongoInternals.NpmModules.mongodb.module.ObjectID(gridFsFileId); ``` ## 3. Create an upload handler for the bucket @@ -74,8 +71,8 @@ In order to stay flexible enough in the choice of the bucket we use a factory f import { Meteor } from 'meteor/meteor'; import fs from 'fs'; -export const createAfterUpdate = bucket => - function createOnAfterUpload (file) { +export const createOnAfterUpload = bucket => + function onAfterUpload (file) { const self = this; // here you could manipulate your file @@ -88,7 +85,7 @@ export const createAfterUpdate = bucket => fs.createReadStream(file.versions[ versionName ].path) // this is where we upload the binary to the bucket using bucket.openUploadStream - // see http://mongodb.github.io/node-mongodb-native/3.2/api/GridFSBucket.html#openUploadStream + // see http://mongodb.github.io/node-mongodb-native/3.6/api/GridFSBucket.html#openUploadStream .pipe(bucket.openUploadStream( file.name, { @@ -112,7 +109,7 @@ export const createAfterUpdate = bucket => self.collection.update(file._id, { $set: { - [ property ]: ver._id.toHexString(); + [ property ]: ver._id.toHexString(), } }); @@ -130,12 +127,12 @@ factory function as in step 3: ```js import { createObjectId } from '../createObjectId'; -const createInterceptDownload = bucket => +export const createInterceptDownload = bucket => function interceptDownload (http, file, versionName) { const { gridFsFileId } = file.versions[ versionName ].meta || {}; if (gridFsFileId) { // opens the download stream using a given gfs id - // see: http://mongodb.github.io/node-mongodb-native/3.2/api/GridFSBucket.html#openDownloadStream + // see: http://mongodb.github.io/node-mongodb-native/3.6/api/GridFSBucket.html#openDownloadStream const gfsId = createObjectId({ gridFsFileId }); const readStream = bucket.openDownloadStream(gfsId); @@ -169,7 +166,7 @@ is removing the file handle: ```js import { createObjectId } from '../createObjectId' -const createOnAfterRemove = bucket => +export const createOnAfterRemove = bucket => function onAfterRemove (files) { files.forEach(file => { Object.keys(file.versions).forEach(versionName => { diff --git a/docs/gridfs-integration.md b/docs/gridfs-integration.md index fe3e2f81..b4c4305f 100644 --- a/docs/gridfs-integration.md +++ b/docs/gridfs-integration.md @@ -1,12 +1,11 @@ ### Use GridFS with `gridfs-stream` as a storage -**Deprecation warning:** The `gridfs-stream` [has not been updated in a long time](https://github.com/aheckmann/gridfs-stream) and is therefore -considered deprecated. An alternative is to use the Mongo driver's native `GridFSBucket`, which is also [described in -this wiki](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md). +> :warning: **Deprecation warning:** The `gridfs-stream` [has not been updated in a long time](https://github.com/aheckmann/gridfs-stream) and its implementation relies on the deprecated [`GridStore API`](https://mongodb.github.io/node-mongodb-native/3.6/api/GridStore.html). An alternative is to use the Mongo driver's native `GridFSBucket`, which is also [described in +this wiki](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md). Example below shows how to handle (store, serve, remove) uploaded files via GridFS. -Please note - by default all files will be served with `200` response code, which is fine if you planning to deal only with small files, or not planning to serve files back to users (*use only upload and storage*). For support of `206` partial content see [this article](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-streaming.md). +Please note - by default all files will be served with `200` response code, which is fine if you planning to deal only with small files, or not planning to serve files back to users (*use only upload and storage*). For support of `206` partial content see [this article](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-streaming.md). ### Preparation @@ -59,7 +58,7 @@ let gfs; if (Meteor.isServer) { gfs = Grid( MongoInternals.defaultRemoteCollectionDriver().mongo.db, - MongoInternals.NpmModule + MongoInternals.NpmModules.mongodb.module ); } ``` @@ -132,7 +131,7 @@ let gfs; if (Meteor.isServer) { gfs = Grid( MongoInternals.defaultRemoteCollectionDriver().mongo.db, - MongoInternals.NpmModule + MongoInternals.NpmModules.mongodb.module ); } diff --git a/docs/gridfs-migration.md b/docs/gridfs-migration.md index f3022da0..1d45bda4 100644 --- a/docs/gridfs-migration.md +++ b/docs/gridfs-migration.md @@ -18,9 +18,9 @@ First create three Methods in P that each share one of the three crucial Parts o - Sharing the `fs.files`* metadata for the files' respective subversions - Sharing the `fs.chunks`* (the actual data) of all stored files and their subversions -*This assumes the [default configuration of your GridFS](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md) which is by default using the `db.fs.files` and `db.fs.chunks` collections.* +*This assumes the [default configuration of your GridFS](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md) which is by default using the `db.fs.files` and `db.fs.chunks` collections.* -*For custom configuration you may consult the JS Mongo Native Driver documentation on [GridFSBucket](http://mongodb.github.io/node-mongodb-native/3.2/api/GridFSBucket.html).* +*For custom configuration you may consult the JS Mongo Native Driver documentation on [GridFSBucket](http://mongodb.github.io/node-mongodb-native/3.6/api/GridFSBucket.html).* #### P/server/sync.js diff --git a/docs/gridfs-streaming.md b/docs/gridfs-streaming.md index c34573ad..cd572542 100644 --- a/docs/gridfs-streaming.md +++ b/docs/gridfs-streaming.md @@ -1,8 +1,8 @@ -By default files served from GridFS returned with `200` response code. Which means if you serve video/audio/large downloads, file will be entirely read to memory and serve to client. This behavior is not best solution in terms of performance and resource usage. +By default files served from GridFS returned with `200` response code. This behavior is not best solution in terms of performance and resource usage. `206` partial content response is much better from all sides, for video and audio it allows to support time-seeking, for large files - resumable downloads. For server-side it reduces memory and CPU consumption. -Below is code sample suggested by [@j1016h](https://github.com/j1016h), where [`interceptDownload`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md) is used to alter default file-serving behavior - *use it as it at your own risk, or take it and modify to meet your own needs*. +Below is code sample suggested by [@j1016h](https://github.com/j1016h), where [`interceptDownload`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md) is used to alter default file-serving behavior - *use it as it at your own risk, or take it and modify to meet your own needs*. ```js interceptDownload(http, image, versionName) { @@ -145,4 +145,4 @@ interceptDownload(http, image, versionName) { } return Boolean(_id); } -``` \ No newline at end of file +``` diff --git a/docs/insert.md b/docs/insert.md index 5ed901cb..eebd293f 100644 --- a/docs/insert.md +++ b/docs/insert.md @@ -77,7 +77,7 @@ Upload file to a Server via DDP or HTTP. Upload as base64 string, useful for data taken from `canvas` - See Examples + See Examples diff --git a/docs/link.md b/docs/link.md index d48b0c0d..10eb0f3c 100644 --- a/docs/link.md +++ b/docs/link.md @@ -15,7 +15,7 @@ Use `.link()` method of [*FileCursor* instance](https://github.com/veliovgroup/M FilesCollection#link(fileRef, version, URIBase); // [*Isomorphic*] ``` -- `fileRef` {*Object*} - Object returned from MongoDB collection or [after upload](https://github.com/veliovgroup/meteor-files-website/blob/master/imports/client/upload/upload-form.js#L85) +- `fileRef` {*Object*} - Object returned from MongoDB collection or [after upload](https://github.com/veliovgroup/meteor-files-website/blob/master/imports/client/upload/upload-form.js#L194-L205) - `version` {*String*|*void 0*} - [OPTIONAL] File's subversion name, default: `original`. If requested subversion isn't found, `original` will be returned - `URIBase` {*String*} - [OPTIONAL] base URI (domain), default: `ROOT_URL` or `MOBILE_ROOT_URL` on *Cordova*. - Returns {*String*} - Absolute URL to file diff --git a/docs/load.md b/docs/load.md index bd84cca6..198a4081 100644 --- a/docs/load.md +++ b/docs/load.md @@ -34,7 +34,7 @@ Write file to file system from remote URL (external resource) and add record to import { FilesCollection } from 'meteor/ostrio:files'; const Images = new FilesCollection({collectionName: 'Images'}); -Images.load('https://raw.githubusercontent.com/VeliovGroup/Meteor-Files/master/logo.png', { +Images.load('https://raw.githubusercontent.com/veliovgroup/Meteor-Files/master/logo.png', { fileName: 'logo.png', fileId: 'abc123myId', //optional timeout: 60000, // optional timeout diff --git a/docs/meteorup-usage.md b/docs/meteorup-usage.md index 081936c4..0d9cde66 100644 --- a/docs/meteorup-usage.md +++ b/docs/meteorup-usage.md @@ -4,7 +4,7 @@ [MeteorUp (MUP)](https://github.com/kadirahq/meteor-up) uses Docker, and by default, there is no volume mounted on the server. Therefore, even if `storagePath` is declared in constructor, files that are being uploaded are still being stored in cache, and on every deploy, all the uploaded files __get erased__. -Read more at [Issue #270](https://github.com/VeliovGroup/Meteor-Files/issues/72) and [Issue #290](https://github.com/VeliovGroup/Meteor-Files/issues/290). +Read more at [Issue #270](https://github.com/veliovgroup/Meteor-Files/issues/72) and [Issue #290](https://github.com/veliovgroup/Meteor-Files/issues/290). To solve this issue, a volume has to be declared in `project-root/mup.json`. In this example, images will be stored at `/images` directory. @@ -74,4 +74,4 @@ Images = new FilesCollection({ }); ``` -Now, files will be uploaded to `/images` on server, and can be accessed like in [demos](https://github.com/VeliovGroup/Meteor-Files-Demos). +Now, files will be uploaded to `/images` on server, and can be accessed like in [demos](https://github.com/veliovgroup/Meteor-Files-Demos). diff --git a/docs/react-example.md b/docs/react-example.md index 74c3a814..ee14a4bc 100644 --- a/docs/react-example.md +++ b/docs/react-example.md @@ -1,6 +1,6 @@ # React.js usage -*This example is for the front-end UI only. The server side [methods](https://github.com/VeliovGroup/Meteor-Files/wiki#api) and [publications](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/collection.md) are the same.* +*This example is for the front-end UI only. The server side [methods](https://github.com/veliovgroup/Meteor-Files/wiki#api) and [publications](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/collection.md) are the same.* ## Brief: diff --git a/docs/readme.md b/docs/readme.md index 379415e9..105ff038 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -3,22 +3,22 @@ ## About: - Event-driven API -- [TypeScript Definitions](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/typescript-definitions.md) +- [TypeScript Definitions](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/typescript-definitions.md) - Upload / Read files in Cordova app: __Cordva support__ (Any with support of `FileReader`) - File upload: - - Upload via *HTTP* or *DDP*, [read about difference](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/about-transports.md#about-upload-transports) + - Upload via *HTTP* or *DDP*, [read about difference](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/about-transports.md#about-upload-transports) - Ready for small and large files (optimized RAM usage) - Pause / Resume upload - Auto-pause when connection to server is interrupted - Parallel multi-stream async upload (*faster than ever*) - Support of non-Latin (non-Roman) file names -- [Use third-party storage](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/3rd-party-storage.md): - - [AWS S3 Bucket Integration](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/aws-s3-integration.md) - - [DropBox Integration](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/dropbox-integration.md) - - [GridFS using `GridFSBucket`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md#use-gridfs-with-gridfsbucket-as-a-storage) - - [GridFS using `gridfs-stream` (legacy)](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-integration.md) +- [Use third-party storage](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/3rd-party-storage.md): + - [AWS S3 Bucket Integration](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/aws-s3-integration.md) + - [DropBox Integration](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/dropbox-integration.md) + - [GridFS using `GridFSBucket`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md#use-gridfs-with-gridfsbucket-as-a-storage) + - [GridFS using `gridfs-stream` (legacy)](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-integration.md) - Google Drive - - [Google Cloud Storage Integration](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/google-cloud-storage-integration.md) + - [Google Cloud Storage Integration](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/google-cloud-storage-integration.md) - any other with JS/REST API - Get upload speed - Get remaining upload time @@ -37,27 +37,27 @@ - Support for file subversions, like thumbnails, audio/video file formats, revisions, and etc. - Store wherever you like: - You may use `Meteor-Files` as temporary storage - - After file is uploaded and stored on FS you able to `mv` or `cp` its content, see [3rd-party storage integration](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/3rd-party-storage.md) examples + - After file is uploaded and stored on FS you able to `mv` or `cp` its content, see [3rd-party storage integration](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/3rd-party-storage.md) examples - Subscribe on files (*collections*) you need ## ToC: ### API: -- [`FilesCollection` Constructor](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md) [*Isomorphic*] - Initialize FilesCollection - - [SimpleSchema Integration](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md#attach-schema-isomorphic) - - [Collection `deny` rules](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md#deny-collection-interaction-on-client-server) - - [Collection `allow` rules](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md#allow-collection-interaction-on-client-server) - - [Control upload access](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md#use-onbeforeupload-to-avoid-unauthorized-upload) - - [Control remove access](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md#use-onbeforeremove-to-avoid-unauthorized-remove) - - [Custom response headers](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/custom-response-headers.md#custom-response-headers) for CORS or anything else -- [`FileCursor` Class](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/FileCursor.md) - Instance of this class is returned from `.findOne()` method +- [`FilesCollection` Constructor](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md) [*Isomorphic*] - Initialize FilesCollection + - [SimpleSchema Integration](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md#attach-schema-isomorphic) + - [Collection `deny` rules](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md#deny-collection-interaction-on-client-server) + - [Collection `allow` rules](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md#allow-collection-interaction-on-client-server) + - [Control upload access](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md#use-onbeforeupload-to-avoid-unauthorized-upload) + - [Control remove access](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md#use-onbeforeremove-to-avoid-unauthorized-remove) + - [Custom response headers](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/custom-response-headers.md#custom-response-headers) for CORS or anything else +- [`FileCursor` Class](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/FileCursor.md) - Instance of this class is returned from `.findOne()` method - `remove(callback)` - {*undefined*} - Remove document - `link()` - {*String*} - Returns downloadable URL to File - `get(property)` - {*Object*|*mix*} - Returns current document as a plain Object - `fetch()` - {[*Object*]}- Returns current document as plain Object in Array - `with()` - {*FileCursor*} - Returns reactive version of current FileCursor -- [`FilesCursor` Class](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/FilesCursor.md) - Instance of this class is returned from `.find()` method +- [`FilesCursor` Class](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/FilesCursor.md) - Instance of this class is returned from `.find()` method - `fetch()` - {*[Object]*} - Returns all matching document(s) as an Array - `count()` - {*Number*} - Returns the number of documents that match a query - `remove(callback)` - {*undefined*} - Removes all documents that match a query @@ -65,44 +65,44 @@ - `each()` - {*[FileCursor]*} - Returns an Array of `FileCursor` made for each document on current Cursor - `observe(callbacks)` - {*Object*} - Functions to call to deliver the result set as it changes - `observeChanges(callbacks)` - {*Object*} - Watch a query. Receive callbacks as the result set changes - - [See all methods](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/FilesCursor.md) -- [Default Collection Schema](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/schema.md#schema) - - [Attach SimpleSchema and Collection2](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/schema.md#attach-schema-recommended) - - [Extend Schema](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/schema.md#extend-default-schema) - - [Override Schema](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/schema.md#pass-your-own-schema-not-recommended) -- [`write()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/write.md) [*Server*] - Write `Buffer` to FS and FilesCollection -- [`load()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/load.md) [*Server*] - Write file to FS and FilesCollection from remote URL -- [`addFile()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/addFile.md) [*Server*] - Add local file to FilesCollection from FS -- [`findOne()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/findOne.md) [*Isomorphic*] - Find one file in FilesCollection -- [`find()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/find.md) [*Isomorphic*] - Create cursor for FilesCollection -- [`insert()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/insert.md) [*Client*] - Upload file to server - - [`FileUpload.pipe()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/insert.md#piping) -- [`remove()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/remove.md) [*Isomorphic*] - Remove files from FilesCollection and unlink from FS -- [`unlink()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/unlink.md) [*Server*] - Unlink file from FS -- [`link()`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/link.md) [*Isomorphic*] - Generate downloadable link -- [`collection`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/collection.md) [*Isomorphic*] - `Meteor.Collection` instance -- [Template helper `fileURL`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/template-helper.md) [*Client*] - Generate downloadable link in a template + - [See all methods](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/FilesCursor.md) +- [Default Collection Schema](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/schema.md#schema) + - [Attach SimpleSchema and Collection2](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/schema.md#attach-schema-recommended) + - [Extend Schema](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/schema.md#extend-default-schema) + - [Override Schema](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/schema.md#pass-your-own-schema-not-recommended) +- [`write()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/write.md) [*Server*] - Write `Buffer` to FS and FilesCollection +- [`load()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/load.md) [*Server*] - Write file to FS and FilesCollection from remote URL +- [`addFile()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/addFile.md) [*Server*] - Add local file to FilesCollection from FS +- [`findOne()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/findOne.md) [*Isomorphic*] - Find one file in FilesCollection +- [`find()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/find.md) [*Isomorphic*] - Create cursor for FilesCollection +- [`insert()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/insert.md) [*Client*] - Upload file to server + - [`FileUpload.pipe()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/insert.md#piping) +- [`remove()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/remove.md) [*Isomorphic*] - Remove files from FilesCollection and unlink from FS +- [`unlink()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/unlink.md) [*Server*] - Unlink file from FS +- [`link()`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/link.md) [*Isomorphic*] - Generate downloadable link +- [`collection`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/collection.md) [*Isomorphic*] - `Meteor.Collection` instance +- [Template helper `fileURL`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/template-helper.md) [*Client*] - Generate downloadable link in a template ### Examples: -- `docs` [Third-party storage (AWS S3, DropBox, GridFS and Google Storage)](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/3rd-party-storage.md) -- `code-sample` [File subversions](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/file-subversions.md) - Create video file with preview and multiple formats +- `docs` [Third-party storage (AWS S3, DropBox, GridFS and Google Storage)](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/3rd-party-storage.md) +- `code-sample` [File subversions](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/file-subversions.md) - Create video file with preview and multiple formats - `code-sample repo` [cURL/POST upload](https://github.com/noris666/Meteor-Files-POST-Example) by [@noris666](https://github.com/noris666) -- `tutorial` [MUP/Docker Persistent Storage](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/meteorup-usage.md) - Deploy via MeteorUp to Docker container with persistent `storagePath` -- `tutorial` [React.js usage](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/react-example.md) - React with a progress bar and component with links to view, re-name, and delete the files -- `tutorial` [Migrating from CollectionFS/CFS](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/convert-from-cfs-to-meteor-files.md) - Live conversion from the depreciated CFS to Meteor-Files (*Amazon S3 specifically, but applies to all*) -- `tutorial` [Geting `FilesCollection` instance](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/collection-instances.md#filescollection-instances-and-mongocollection-instances) - Retrieve the *FilesCollection* by it's underlying `Mongo.Collection` instance -- `tutorial` [Migrating / moving GridFS stored files](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-migration.md) - Three step way of moving/copying/syncing GridFS-stored files between multiple Meteor applications -- `tutorial` [GridFS streaming](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/gridfs-streaming.md) - Implement `206` partial content response +- `tutorial` [MUP/Docker Persistent Storage](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/meteorup-usage.md) - Deploy via MeteorUp to Docker container with persistent `storagePath` +- `tutorial` [React.js usage](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/react-example.md) - React with a progress bar and component with links to view, re-name, and delete the files +- `tutorial` [Migrating from CollectionFS/CFS](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/convert-from-cfs-to-meteor-files.md) - Live conversion from the depreciated CFS to Meteor-Files (*Amazon S3 specifically, but applies to all*) +- `tutorial` [Geting `FilesCollection` instance](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/collection-instances.md#filescollection-instances-and-mongocollection-instances) - Retrieve the *FilesCollection* by it's underlying `Mongo.Collection` instance +- `tutorial` [Migrating / moving GridFS stored files](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-migration.md) - Three step way of moving/copying/syncing GridFS-stored files between multiple Meteor applications +- `tutorial` [GridFS streaming](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-streaming.md) - Implement `206` partial content response - __Post-processing:__ - - `tutorial` [Create Thumbnails](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/image-processing.md) - - `tutorial` [Image post-processing using AWS Lambda](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/aws-s3-integration.md#further-image-jpeg-png-processing-with-aws-lambda) - - `code-sample` [Resize, create thumbnail](https://github.com/VeliovGroup/Meteor-Files-Demos/blob/master/demo/imports/server/image-processing.js#L19) + - `tutorial` [Create Thumbnails](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/image-processing.md) + - `tutorial` [Image post-processing using AWS Lambda](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/aws-s3-integration.md#further-image-jpeg-png-processing-with-aws-lambda) + - `code-sample` [Resize, create thumbnail](https://github.com/veliovgroup/Meteor-Files-Demos/blob/master/demo/imports/server/image-processing.js#L19) ### Related Packages: -- [`pyfiles` (meteor-python-files))](https://github.com/VeliovGroup/meteor-python-files) Python Client for Meteor-Files package -- [`meteor-autoform-file`](https://github.com/VeliovGroup/meteor-autoform-file) - Upload and manage files with [autoForm](https://github.com/aldeed/meteor-autoform) +- [`pyfiles` (meteor-python-files))](https://github.com/veliovgroup/meteor-python-files) Python Client for Meteor-Files package +- [`meteor-autoform-file`](https://github.com/veliovgroup/meteor-autoform-file) - Upload and manage files with [autoForm](https://github.com/aldeed/meteor-autoform) ### Articles: @@ -110,4 +110,4 @@ ### WIP: -- Experimental [webrtc-data-channel](https://github.com/VeliovGroup/Meteor-Files/tree/webrtc-data-channel) branch, welcome for feedback/discussion +- Experimental [webrtc-data-channel](https://github.com/veliovgroup/Meteor-Files/tree/webrtc-data-channel) branch, welcome for feedback/discussion diff --git a/docs/remove.md b/docs/remove.md index c4be6b0f..64e9e3a0 100644 --- a/docs/remove.md +++ b/docs/remove.md @@ -34,7 +34,7 @@ Images.remove({_id: 'Rfy2HLutYK4XWkwhm'}, (error) => { }); ``` -*Use onBeforeRemove to avoid unauthorized actions, for more info see [onBeforeRemove callback](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md#use-onbeforeremove-to-avoid-unauthorized-remove)* +*Use onBeforeRemove to avoid unauthorized actions, for more info see [onBeforeRemove callback](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md#use-onbeforeremove-to-avoid-unauthorized-remove)* ```js import { FilesCollection } from 'meteor/ostrio:files'; diff --git a/docs/schema.md b/docs/schema.md index dba829d4..c077405a 100644 --- a/docs/schema.md +++ b/docs/schema.md @@ -1,6 +1,6 @@ # Schema -*Below is default Files collection schema. Please keep default schema structure when extending it!. To pass your own schema use* `schema` *property when passing config to* [`FilesCollection`](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/constructor.md) *constructor.* +*Below is default Files collection schema. Please keep default schema structure when extending it!. To pass your own schema use* `schema` *property when passing config to* [`FilesCollection`](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/constructor.md) *constructor.* For more info see [Collection2](https://github.com/aldeed/meteor-collection2) and [simple-schema](https://atmospherejs.com/aldeed/simple-schema) packages. diff --git a/docs/template-helper.md b/docs/template-helper.md index 107a10a2..e86b10fe 100644 --- a/docs/template-helper.md +++ b/docs/template-helper.md @@ -34,7 +34,7 @@ if (Meteor.isClient) { __Note:__ If requested version of file is not available - the original file will be returned. -For more info about file's subversions see: [create subversions](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/file-subversions.md) section +For more info about file's subversions see: [create subversions](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/file-subversions.md) section ```handlebars @@ -59,7 +59,7 @@ For `compare` helper see [ostrio:templatehelpers](https://atmospherejs.com/ostri __Note:__ If thumbnail (*subversion of the file*) is not available the original file will be returned. -For more info about file's subversions see: [create subversions](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/file-subversions.md) section +For more info about file's subversions see: [create subversions](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/file-subversions.md) section ```handlebars {{fileRef.name}} @@ -69,7 +69,7 @@ For more info about file's subversions see: [create subversions](https://github. #### Example for video with multiple subversions: -For more info about file's subversions see: [create subversions](https://github.com/VeliovGroup/Meteor-Files/blob/master/docs/file-subversions.md) section +For more info about file's subversions see: [create subversions](https://github.com/veliovgroup/Meteor-Files/blob/master/docs/file-subversions.md) section ```handlebars