Hi all,
I noticed that for certain files a corresponding ".dir" folder gets created on your local laptop when you perform vault checkout from CRX. Does anyone know why this ".dir" folder is getting created ? It happens to files with certain "jcr:mimeType".
For example:
C:\rohit> vlt co http://localhost:4502/crx/-/jcr:root/app/clientlib/js/validation.js .
This will create extra "validation.js.dir" folder on your local
Found that if the "jcr:content" has jcr:mimeType of "text/javascript" instead of "application/javascript" then this ".dir" folder is created. Then read on google that "text/javascript" will become obsolete so we should be using "application/javascript" as mimeType
Now I tried checkout of another font file with ".ttf" extension (fontawesome-webfont.ttf) having "jcr:mimeType" of "application/x-font-ttf" (seem like mimeType is correctly detected in CRX). For this also a ".dir" folder got created. If I change the mimeType to application/o
Question is:
1) Why is this ".dir" folder getting created for specific mimeType ? Does this affect anything ?
2) For ".ttf" extension which mime type should i use ? On google i got mixed answered (both application/octet-stream & application/x-font-ttf)
http://stackoverflow.com/questions/12660389/what-is-the-correct-mime-type-for-a-font-file
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi Sham,
Thanks for your quick reply.
For (2) - So when i uploaded the ".ttf" file via webdav howcome in CRX the mimeType was set to "application/x-font-ttf" . Yes i clearly see in the link which you have shared that ".ttf" is not present there.
static { // add some default mappings addMapping(false, "text/plain", "txt", "jsp", "jspx", "jspf", "ecma", "esp", "xsl", "xslt", "dtd", "properties", "tld" ,"php", "rb", "bnd"); addMapping(false, "text/cnd" , "cnd"); addMapping(false, "text/x-java-source" , "java"); addMapping(true, "application/java-vm" , "class"); addMapping(false, "text/html" , "html", "htm"); addMapping(false, "text/xml" , "xml"); addMapping(false, "text/css" , "css", "less"); addMapping(false, "text/calendar", "ics"); addMapping(false, "image/svg+xml", "svg"); addMapping(false, "application/xliff+xml" , "xliff"); addMapping(true, "image/gif" , "gif"); addMapping(true, "image/png" , "png"); addMapping(true, "image/jpeg", "jpg", "jpeg"); addMapping(true, "image/jpg" , "jpg", "jpeg"); // this is for compatibility reasons addMapping(false, "application/json", "json"); addMapping(true, "application/java-archive", "jar"); addMapping(false, "application/javascript", "js"); addMapping(false, "application/ecmascript", "ecma"); addMapping(false, "application/x-javascript", "js"); // discouraged per RFC-4329 addMapping(true, "application/pdf", "pdf"); addMapping(true, "application/x-shockwave-flash", "swf"); addMapping(true, "application/zip", "zip"); addMapping(true, "image/vnd.microsoft.icon", "ico"); addMapping(true, "application/x-font-woff", "woff"); addMapping(true, "application/vnd.ms-fontobject", "eot"); }
Views
Replies
Total Likes