question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LocalFile Field Type Format not working

See original GitHub issue
image: { type: Types.LocalFile,dest: '/home/veda/ks/public/img', prefix: '/img',
            format: function(item, file){
                return '<img src="/img/'+file.path.replace('/home/ks/admin/public/img','')+'/'+file.filename+'" style="max-width: 200px"\>';
            }
    },

screen shot 2015-01-17 at 11 20 32

It show an image on keystone version 0.2.36 but when I update to keystone 0.2.40 it show file name instead.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
krksgbrcommented, May 9, 2016

just want to bring this PR to attention. #2484 i merged it into my fork and everything works as expected.

1reaction
stenniecommented, Jun 24, 2018

As noted in earlier comments, the File API has been rewritten using pluggable storage for Keystone 4 (née 0.4).

For more information, see the File Field API documentation and API File and image Uploads Guide in the Keystone 4 documentation.

For specific File adapters, see:

Regards, Stennie

Read more comments on GitHub >

github_iconTop Results From Across the Web

[gatsby-source-wordpress] Cannot query field "localFile" on ...
We are trying to query acf/featured_image images from wordpress and following the image processing example, we are getting this error: ...
Read more >
localfile - Local configuration (ossec.conf)
Used for Microsoft Windows event logs, returns the events in JSON format. Monitors every channel specified in the configuration file and shows every...
Read more >
How to assign a local file to the FileField in Django?
Anyway Django's file type works like a decorator, so you can simply wrap it around existing file objects to meet the needs of...
Read more >
How to format text fields as local file links in Dynamics CRM ...
AFAIK, there're two appropriate ways to format such data: 1. Using text type 2. Using URL type. The problem is when you paste...
Read more >
Local File Source | Sumo Logic Docs
Supported encoding for local file sources​ ... File contention issues are still possible, however. ... Select Local File for the Source type.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found