theara
March 12, 2018, 4:59am
1
I base on Meteor + Vue (Element UI)
.
Please help me how to upload file???
You can use meteor-uploads , the package is deprecated and it needs a maintainer but it is a great package, I am still using it and it works fine though it will be great if some good people maintained it.
You can create custom templates(Blaze) since you are using Vue you will need a way of rendering that template to vue, there is a couple of packages that easily do that ( This is one of them ).
The meteor-uploads has a very good documentation.
Not completely related to Vue.js but these links helped me. I hope they will for your case.
There is a lot of stuff out there, for file uploads, but I just need the simple use case of letting the user browse to a file, click “upload” and then be able to process it on the server… I want to store it on my local server
I have a simple example working by doing:
common.js
YourFileCollection = new FS.Collection("yourFileCollection", {
stores: [new FS.Store.FileSystem("yourFileCollection", {path: "~/meteor_uploads"})]
});
YourFileCollection.allow({
insert: function (userId, doc) {…
Hello everyone.
This topic is related only to whom using, or plan to use FilesCollection package. I would like to ask community to give a right path for Meteor-Files 2.0. Any feature requests, suggestion and ideas is highly appreciated.
Lately this lib gained an attention, thank you to everyone who has a chance to use is. Lots of contributors have made this lib much better.
Now it’s time for v2.0, time to move from CoffeeScript to ES6, time to remove all obsolete code.
Here is some of my tho…
@borntodev has the right package recommendation.
For file management I also recomend Collection.Grid, it’s functions can be imported without much issue.
Just follow this documentation
Where event.target.files
is related to value in HTML.
Remember that uploading a file can also be done using FileReader which is Web API, framework agnostic (same in react, Vue, Angular, etc).
1 Like