keystonejs/keystone-classic

Keystone Beta 4.0.0-beta.5 - required being ignored for type: Types.File and image preview not working

開放

#4,064 建立於 2017年3月3日

 (10 則留言) (6 個反應) (0 位負責人)JavaScript (2,288 個分叉)batch import
bughelp wanted

倉庫指標

星標
 (14,656 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

The admin is ignoring that a file is required and also it's image preview:

image: {
	type: Types.File,
	storage: storage,
	filename: function (item, file) {
		return item.id + '.' + file.extension
	},
	format: function (item, file) {
		return '<img src="' + file.href + '" style = "max-width: 120px">'
	},
	allowedTypes: ['jpg', 'png', 'jpg', 'gif'],
	required: true,
	initial: true,
},

image

貢獻者指南