Playing around with settings I set the storage path to assets/app/uploads/uploadedFiles, but I cannot find this directory anywhere. Where are the files stored?
Hi @jdmswong ,
If you didn't start storagePath with leading slash, it's mean you're store file in relative path to running process. And it should be somewhere under .meteor/build/server/ (_unltil [email protected]_)
Since [email protected] it's changed _and currently I can't tell you where it's stored_.
I always recommend to use absolute path and store files under /data directory, you can try it.
Hi @dr-dimitru, If I use the default storagePath how can I backup the files from storage?
@mking200 @jdmswong
You can check path to file in MongoDB records there is path field.
On production it is relative to main.js file (_the running script_)
@mking200 @jdmswong is this issue still persists?
Hi @dr-dimitru, can I ask how the FileCursor.link() generates the link to images? And is it possible to override this, and create a custom link?
I'm thinking of pointing the link to images in public folder, so I don't have to reset and insert the Images collection each time the app is run, or each time an update is pushed on the server.
@mking200 take a look on the public option of the _Constructor_
Ok, but this will affect all uploads to the FilesCollection right? Am just thinking of modifying some image upoads, but not for all uploads.
Are there any values I can change using Images.collection.update( ), so that the .link( ) function will generate the custom link?
Are there any values I can change using Images.collection.update( ), so that the .link( ) function will generate the custom link?
Link will be always the same.
but this will affect all uploads to the FilesCollection right?
No, you will upload files as you did before
Am just thinking of modifying some image upoads, but not for all uploads.
Create two collections, public and private
Now files are stored in '.meteor/local/build/programs/server/app/assets/*collectionName' by default.
So, in this case we have "server" folder as root directory.
But, this is a problem, cause if we will rebuild the project, meteor will clean up 'build' directory and all included files.
Can you explain, what can we do in this case?
Dima, ty for package.
@Tbutnyakov
I always recommend to use absolute path and store files under
/datadirectory, you can try it.
I guess I should ad it to the docs somewhere, and give a notice about app rebuilds, and possible data loss.
@Tbutnyakov thank you for using this package
Hi @jdmswong , @mking200 and @Tbutnyakov
I've added default storage path explanation into FAQ
Can we close this issue?
I think yes, the other guys may forgot about this issue.
By the way, im just create folder _inside_ a project with Meteor.absolutePath.
@dr-dimitru , package is a very good, but i think you need create a more structured DOCs?
For example, i love the Astronomy package doc. It created with help of github tools.
Look at this: http://jagi.github.io/meteor-astronomy/v2
I thought about it, but separate website only for docs is overhead. I would like to keep everything in wiki, but I'm agree what now it's a bit difficult to read. So, I'm still looking for better solution for docs. May be jsdoc on GitHub Pages will be good solution.
@dr-dimitru No more issues for me on this one.
Hi @BananaCloud ,
Try to start with with:
mkdir /data
chmod 777 /data
Thanks for your fast response, I just figured it's actually the root folder of the server.
Are we talking about the production server or localhost? I can't find my images on production and occasionally they disappear. What is the full path to the image dir?
@janjackson whatever you set to storagePath is a full path to storage, make sure it starts with leading forward slash
Most helpful comment
Hi @jdmswong ,
If you didn't start
storagePathwith leading slash, it's mean you're store file in relative path to running process. And it should be somewhere under.meteor/build/server/(_unltil [email protected]_)Since [email protected] it's changed _and currently I can't tell you where it's stored_.
I always recommend to use absolute path and store files under
/datadirectory, you can try it.