Comments (4)
Thanks! The Method works 👍 and thx for the package!
from meteor-files.
Hi @FinnFrotscher ,
To make this package more secure place, we block all actions from client by default.
Please use server side methods to update collection on server.
Example:
// Server:
Meteor.methods({
'collections.images.update': function (_id, set) {
check(_id, String);
check(set, Object);
// Run more check(s) here to make sure this call is permitted
this.unblock(); // <-- Use to make this method asynchronous
Images.collection.update(_id, {$set: set});
return true;
}
})
// Client
Meteor.call('collections.images.update', this._id, {'meta.big': !this.meta.big})
from meteor-files.
Also you can rewrite deny
rule on this collection (at your own risk):
Images.collection.deny({
insert: function() {
return true;
},
update: function() {
return false; // <-- Allow update from client
},
remove: function() {
return true;
}
});
from meteor-files.
@FinnFrotscher
Glad you found it helpful.
Do not hesitate to star it at both GitHub and Atmosphere.
Also you may like to Tweet about it or share at Facebook
from meteor-files.
Related Issues (20)
- [FilesCollection.ServiceFile] Path "/assets/app/uploads/ServiceFileCollection" is not writable! HOT 2
- How to change item metadata before it is inserted into the collection? HOT 9
- How do I update a filesCollection after Server side Write created? HOT 1
- Get user ip on upload HOT 9
- Since Meteor 2.11 - Exception in setTimeout callback: TypeError: fs.remove is not a function HOT 9
- Question: Can you store directly in GridFS? HOT 2
- Question: Save link in database?
- Update aws-sdk to v3 in 'Use AWS:S3 As Storage' Documentation HOT 4
- Files.load -> options.fileName is not in filepath HOT 2
- FilesCollection.find(...).each() not working properly? HOT 1
- HTTP uploads not working, multi-instance/cluster environment NGINX balanced HOT 5
- onAfterUpload not throwing error in uploader.on('end') HOT 5
- Cannot stream a video with filenames longer than 80 characters HOT 1
- wrong custom error message when using HTTP
- Make Meteor-Files compatible with meteor-desktop? HOT 4
- Uncaught error when uploading an empty file
- Help Wanted: Method '_FilesCollectionAbort_attachments' not found [404] HOT 1
- Match error: Unknown key in field HOT 5
- User can not be determined in protected callback in Firefox HOT 5
- [3.0.0-beta.6] fileObj._id on upload end ? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-files.