Symfony2: Edit file upload

后端 未结 3 1646
慢半拍i
慢半拍i 2021-02-04 18:35

I am using the cookbook article from symfony.com to implement a file upload option for images.

Now I want to load up other images to the entity.

The default stra

3条回答
  •  心在旅途
    2021-02-04 19:22

    I have was in similar situation. I try to edit existing record in database with path to the file. When i edit record i must upload new file, what is not comfortable for users. In my solution i use variable tmp file for file hash and variable file name. All needed operation i made in Action edit class.

    Full example action class in bellow link

    https://github.com/marekz/php_examples/wiki/Symfony-how-to-edit-attachment-form

提交回复
热议问题