localFile .format property ignored by Admin UI
See original GitHub issueHi,
I’m having the same problem as this user: https://groups.google.com/forum/#!searchin/keystonejs/localFile$20format/keystonejs/KVKsu7eywek/851iYDO4pzsJ
The format
property in the following example:
var Photo = new keystone.List('Photo',{track:true});
Photo.add({
name: { type: Types.Key, required: true, index: true },
photo: {
type: Types.LocalFile,
dest: './public/data',
prefix: '/photo',
allowedTypes: [
'image/jpeg', 'image/png'
],
format: function(item, file) {
console.log('format()');
return '<img src="/data/' + item.id + '.' + file.extension + '" style="max-width: 300px">';
}
}
});
… inserts no <img>
tag at all in the detail page of an ‘image’ item in the Admin UI. Nor is the console message format()
logged. I suspect this property is currenty broken. Currently running Keystone.js 0.3.10.
Issue Analytics
- State:
- Created 8 years ago
- Comments:20 (3 by maintainers)
Top Results From Across the Web
config.properties - Progress Documentation
MOVEit Automation Web Admin uses the information that is specified in the config.properties file to process configuration information. The config.properties ...
Read more >File path formats on Windows systems | Microsoft Learn
In this article, learn about file path formats on Windows systems, such as traditional DOS paths, DOS device paths, and universal naming ...
Read more >keystone | Yarn - Package Manager
Web Application Framework and Admin GUI / Content Management System built on ... KeystoneJS is a powerful Node.js content management system and web...
Read more >Hive connector — Trino 403 Documentation
Enable reading data from subdirectories of table or partition locations. If disabled, subdirectories are ignored. This is equivalent to the hive.mapred.supports ...
Read more >Apache NiFi Expression Language Guide
White space is ignored by the Expression Language between delimiters. Therefore, we can use the ... Variables defined in custom properties files through...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Why is there no hint in the documentation that the 3.X branch does not support the format function on LocalFiles(s)? This is very confusing, @JedWatson !
closing in favor of https://github.com/keystonejs/keystone/issues/916