search

Home  >  Q&A  >  body text

Issues with uploading images and thumbnails into the database

QQ图片20191208093407.png


QQ图片20191208093615.pngThere are check boxes in the html form, and some fields have default values, so is it impossible to specify the fields one by one to upload data?

拼搏奋斗拼搏奋斗1812 days ago1423

reply all(3)I'll reply

  • 拼搏奋斗

    拼搏奋斗2019-12-08 14:13:03

    The problem has been perfectly solved. Convert the file object returned by the controller into an array and assign the specified field to the form $data. I have been troubled for many days and solved it in an instant, haha!

    reply
    0
  • 青草根

    青草根2019-12-08 12:26:36

    Isn’t this under your own control? How did you encapsulate it? Just specify the fields when encapsulating

    reply
    0
  • 拼搏奋斗

    There is no problem with encapsulation. Image upload and thumbnail creation are successful. There is no problem with field specification. However, the two fields returned become an array. When added to the form data, it becomes a nested array. All other data are Okay, I just don’t know how to handle these two image paths before they can be saved into the database?

    拼搏奋斗 · 2019-12-08 13:45:40
  • Cancelreply