PrestaShop / docs

PrestaShop technical documentation
https://devdocs.prestashop-project.org/
Other
122 stars 478 forks source link

Add a tutorial "How to manage file upload in modern/Symfony pages ?" #304

Closed mickaelandrieu closed 4 years ago

mickaelandrieu commented 5 years ago

This is not that hard for Symfony developers but a complete change for PrestaShop developers.

This could be as simple as "How to add a new collection of pictures linked to a Product for a specific sales channel?"

  1. Render the form, PHP/Twig and Javascripts
  2. How to handle the files (validation + upload at the right place)
  3. How to retrieve them (using database references ?)
  4. How to display a thumbnail of the image, once the file is uploaded
  5. BONUS: How to pre-render a thumbnail once the file has been added to the form (but not yet uploaded to the server)

Some resources

WDYT ?

direwald commented 5 years ago

This would be extremely helpful. Currently fighting with trying to upload a custom image to categories and I can't say the Symfony documentation is too helpful when trying to apply it to Prestashop