Closed twentyfortysix closed 1 year ago
I know, why.. some data are executables.
meaning they are not 2Ww9X6ZNEp3jXuPCd.png but ./2Ww9X6ZNEp3jXuPCd.png
Why some of the static data are saved as executables while others are not. I don't know. At least now I know that the files exists.
If you have large files and need them to be regular files again:
# check their executables (if you have a looong list of files)
find . -type f -perm -u+x -ls
#make them normal again
find . -type f -perm -a=x
you might play with permissions a bit afterwards. This drove me nuts for days.
Hello @twentyfortysix
I see this issue is closed, so here's couple of things for your reference:
fileId
namingFunction
hook on FilesCollection
definitioninterceptDownload
hookhope that helps
I'm having an issue:
I can't figure out the logic behind file naming, sometimes it is file ID, sometimes file name sometimes who knows what. METEOR@1.9.3 ostrio:files@1.14.3
Client and Server related
Description of the problem: After the years on meteor I try to migrate the content to other system. When I try to export media and import them back to new CMS I can't figure out how to locate the correct files with what I see in the database and is in reality on the disk.
here is a specific image record:
first thing what you see is that thumbnails have different naming pattern, once the file name is used once the ID. What is the difference between "path" and "_storagePath", they are same , sometimes differ?
Now when I check the folder with images the real image name is hard to guess it might be a ID or name related.. what I do use now is the "path" value but I'm not sure if that is the correct value I should be using in the migration process. When I use "path" I'm able to locate and find some of the files, not all though. The "path" does not seems to be always right, as when I try to find the file by name or ID sometimes I cannot find it amongst the static data. It is just not there, yet the app shows it as it can be seen from the link/s, like this one: https://jlbjlt.net/data/Images/249wvKAcn28eh9XvS/original/249wvKAcn28eh9XvS.png https://jlbjlt.net/data/Images/249wvKAcn28eh9XvS/original/249wvKAcn28eh9XvS.jpg https://jlbjlt.net/data/Images/249wvKAcn28eh9XvS/original/249wvKAcn28eh9XvS.pdf // ?¿ (see the file type does not matter, how come ?¿)
That is the same image from the json above.. see different names based on the attachment ID.. I guess the name here is just a dynamic route path that gas nothing to do with the real location of the file, little bit too dynamic to my taste. This is how I made the attachment path at that time when I made the app
Meteor.settings.public.siteUrl + obj._downloadRoute + '/' + obj._collectionName + '/' + obj._id + '/' + size + '/' + obj._id + '.' + obj.extension;
But again, what is the real location of the file, meaning what value in the db record I can trust that points to a real file on the disk? Because there is no such file on the disk as /data/antoninjirat-_stan.jpg or /data/249wvKAcn28eh9XvS.jpg(png, ..) yet the picture is served out to client on https://jlbjlt.net/data/Images/249wvKAcn28eh9XvS/original/249wvKAcn28eh9XvS.png.