Editing images on a crud

Asked

Viewed 29 times

0

I have a CRUD of products which has the name, price, description and 4 images for each. Adding, viewing and deleting I’ve already been able to do. But the issue of editing is catching me on account of editing the images. I use the multer library to save and handle the image url. And I’ve realized I can’t play in the field type = "file" that url.

I wanted to play the url on this field below:

<input name="imagem1" type="file" required >

What would be the best strategy for this?

  • Why can’t it be type="text"?

  • 'Cause I’m getting a file, an image of the user

1 answer

0

When you are editing an image field, it makes no sense to try to receive the image again. Just ignore the update field if no input file comes.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.