Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

display image from local drive #1032

Open
YouSour opened this issue May 7, 2018 · 1 comment
Open

display image from local drive #1032

YouSour opened this issue May 7, 2018 · 1 comment

Comments

@YouSour
Copy link

YouSour commented May 7, 2018

hi , i'm using cfs:filesystem for store files and i put path for keep image files on my local drive , everything good , but i didn't know how to get image url and display image on browser from my path local drive. have any idea about this .

const Files = new FS.Collection("files", {
    stores: [new FS.Store.FileSystem("filesStore",{path: '~/Desktop/uploadImageDirectory'})]
});  
@nooitaf
Copy link
Contributor

nooitaf commented May 7, 2018

The local path should not be send to the user as in normal server contitions it would be useless. You want a path inside you pages scope. You could call something like Files.findOne().url() to get the path.
https://github.com/CollectionFS/Meteor-CollectionFS#url

Here is an old example project which might help: https://github.com/nooitaf/cfs-imagetest-100

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants