i try to connect to aws from the features of admin-bro ,
but the virtual field not appearing, i dont know what i missing?
i followed this tutorial : https://itnext.io/the-easiest-and-fastest-way-to-upload-files-in-node-js-4b49e0123190
, in his tutorial he just get the virtual field into the frontend. in mine nothing.
const AdminBro = require("admin-bro");
const { Admin } = require("./admin.entity");
const { passwordAfter, passwordBefore } = require("./actions/passHash");
const uploadFeature = require("@admin-bro/upload");
/**@type {AdminBro.ResourceOptions} */
const options = {
properties: {
encryptedPassword: {
isVisible: false,
},
password: {
type: "password",
},
},
features: [
uploadFeature({
provider: {
aws: {
accessKeyId: process.env.S3_ACCESS_ID,
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
Bucket: "batkolbucket",
region: "EU (Paris) eu-west-3",
},
},
properties: {
file: "virtual",
key: "uploadedFile.path",
mimeType: "uploadedFile.type", // this property is important because allows to have
previews
size: "uploadedFile.size",
filename: "uploadedFile.filename",
},
}),
],
actions: {
new: {
after: passwordAfter,
before: passwordBefore,
},
edit: {
after: passwordAfter,
before: passwordBefore,
},
},
};
module.exports = {
options,
resource: Admin,
};
question from:
https://stackoverflow.com/questions/65598662/admin-bro-upload-feature-doesnt-show-the-virtual-field 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…