jalik / meteor-jalik-ufs

Upload File System for Meteor **DISCONTINUED**
MIT License
100 stars 29 forks source link

Where is the file on the file system? Can i have access to it? #137

Closed pedrofg closed 6 years ago

pedrofg commented 6 years ago

Hello guys, i am using the https://github.com/jalik/jalik-ufs-local, here is a picture of a uploaded image on my db:

pasted image at 2017_11_08 12_56 pm

The upload seems to work since if i go to this url, it shows the image, but where is the image in my project folder? Do i have access to it? Where is this upload folder?

*It is not in the root folder by the way.

This is my setup and creation of the Store:

export const ImagesStore = new UploadFS.store.Local({
  collection: Images.collection,
  name: 'images',
  path: '/uploads/images',
  mode: '0777', // directory permissions
  writeMode: '0777', // file permissions
  filter: new UploadFS.Filter({
    contentTypes: ['image/*'],
    extensions: ['jpg', 'png']
  })
});

UploadFS.config.storesPath = 'uploads';
jalik commented 6 years ago

Have you read the doc ? It says "Specify the path where you want to save the files", then you have a path parameter when you create the store to set where files will actually be read/written to.

So based on your code all files sent to this store will be saved to /uploads/images which is an absolute path, be sure to have created the uploads/images path first and applied required permissions to make it work.

If you are on Windows, which is what you said in another issue, your path will be formated accordingly with antislashes like C:\uploads\images.

pedrofg commented 6 years ago

Answered here: https://github.com/jalik/jalik-ufs/issues/64