-
-
Notifications
You must be signed in to change notification settings - Fork 169
FileCursor
dr.dimitru edited this page Jul 23, 2018
·
3 revisions
FileCursor Class represents each record in FilesCursor#each()
or document returned from FilesCollection#findOne()
method.
All document's original properties is available directly by name, like: FileCursor#propertyName
import { FilesCollection } from 'meteor/ostrio:files';
const Images = new FilesCollection();
const cursor = Images.findOne(); // <-- Returns FileCursor Instance
-
remove(callback)
- {undefined} - Remove document. Callback haserror
argument -
link()
- {String} - Returns downloadable URL to File-
link('version')
- {String} - Returns downloadable URL to File's subversion -
link('original', 'https://other-domain.com/')
- {String} - Returns downloadable URL to File located on other domain -
link('original', '/')
- {String} - Returns relative downloadable URL to File
-
-
get(property)
- {Object|mix} - Returns current document as a plain Object, ifproperty
is specified - returns value of sub-object property -
fetch()
- {[Object]}- Returns current document as plain Object in Array -
with()
- {FileCursor} - Returns reactive version of current FileCursor, useful to use with{{#with FileCursor#with}}...{{/with}}
block template helper
Meteor-Files | Support | Try ostr.io |
---|---|---|
If you found this package useful, — star it at GitHub and support our open source contributions with a monthly pledge, or submit a one-time donation via PayPal | Monitoring, Analytics, WebSec, Web-CRON and Pre-rendering for a website |