Hello, I am very new in strapi and I don’t know, how strapi works internally in backend but I have one hosted strapi given by the client and I am working on it.
I have problem to upload image into components component
like
I have one collection called order, on that I have one component called opc and on that I have one component called director and on that I have one field called ‘image’, I want to upload my image on that and also want to link that.
order > opc > director ( want to upload here in image field )
Hi @nisharg007, can you share information about what happens after you execute your code? Is there an error you’re getting back from the Strapi backend?
If you want to upload files for a component, you will have to specify the index of the item you want to add the file to. Example files.my_component_name[the_index].attribute_name
Is it required to specify index on Single Component ( files.opc[0].director[0].image )
Any update?, i am having the same problem, in my case, there is no errors but the images do not upload, i have a component called licensePhotos inside my model,
my code: const formData = new FormData(); formData.append("files.licensePhotos.drivingLicenseFrontPhoto", payload.files.drivingLicenseFrontPhoto );