i followed the tutorial of admin-bro, i dont get error when i send the image to the provider, but nothing not happen.
my options for "admin" schema, i have field "photo" :
const options = {
properties: {
encryptedPassword: {
isVisible: false,
},
password: {
type: "password",
},
uploadImage: {
features: [
uploadFeature({
provider: {
aws: {
accessKeyId: process.env.S3_ACCESS_ID,
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
Bucket: "blaatkbla-bucket",
region:"EU (Paris) eu-west-3"
},
},
properties: {
key: "photo", // to this db field feature will safe S3 key
mimeType: "mimeType",
validation: {
mimeTypes: "application/pdf",
},
}),
],
components: {
edit: AdminBro.bundle("./components/uploadImage"),
},
},
},
what i missing?
this is what i get in the network tab after added success.
{"redirectUrl":"/admin/resources/Admin","notice":{"message":"Successfully created a new record","type":"success"},"record":{"params":{"photo.size":80503,"photo.path":"C:\Users\Roei\AppData\Local\Temp\upload_bd4b1f414e9151574c0f5dd294567aeb","photo.name":"s3.jpg","photo.type":"image/jpeg","photo.mtime":"2021-01-06T13:28:55.975Z","_id._bsontype":"ObjectID","_id.id":{"type":"Buffer","data":[95,245,187,23,136,44,1,105,4,55,217,157]},"email":"sa@wala.ck","username":"dsapo","encryptedPassword":"$argon2i$v=19$m=4096,t=3,p=1$c8ULnpeAPDrNGuGAL43oGQ$iLfL0+tR0Xx5VUiLpT7yQtk/o2MRD2ByBbK0uk21J98","__v":0},"populated":{},"errors":{},"title":"sa@wala.ck","recordActions":[{"name":"show","actionType":"record","icon":"Screen","label":"Show","resourceId":"Admin","guard":"","showFilter":false,"showInDrawer":false,"hideActionHeader":false,"containerWidth":1,"layout":null,"variant":"default","parent":null,"hasHandler":true,"custom":{}},{"name":"edit","actionType":"record","icon":"Edit","label":"Edit","resourceId":"Admin","guard":"","showFilter":false,"showInDrawer":false,"hideActionHeader":false,"containerWidth":1,"layout":null,"variant":"default","parent":null,"hasHandler":true,"custom":{}},{"name":"delete","actionType":"record","icon":"TrashCan","label":"Delete","resourceId":"Admin","guard":"Do you really want to remove this item?","showFilter":false,"component":false,"showInDrawer":false,"hideActionHeader":false,"containerWidth":1,"layout":null,"variant":"danger","parent":null,"hasHandler":true,"custom":{}}],"bulkActions":[{"name":"bulkDelete","actionType":"bulk","icon":"Delete","label":"Delete all","resourceId":"Admin","guard":"","showFilter":false,"showInDrawer":true,"hideActionHeader":false,"containerWidth":"500px","layout":null,"variant":"danger","parent":null,"hasHandler":true,"custom":{}}]}}