• Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #22375 - Other file uploads extensions on mobile | AMP

I’ve just added pdf, ai and psd as possible uploadable extensions but it only works on desktop. Is it possible to enable them on mobile too?
I’ve followed this tutorial: https://github.com/thuydtshop/prestashop-allow-upload-pdf-ai-psd

Comments

Fred 04 Oct 2021, 15:57

but what exactly did you change in theme’s files?

Stefano Paolucci 04 Oct 2021, 16:32

Code is not mine, so I just added or modified files.
Changes log:
modified controllers/front/ProductController.php
added two images in img/
added ImageManager in /override/classes/
modified ProductController.php in override/controllers/front/
modified ImageRetriever.php in src/Adapter/Image/
modified OrderProductCustomizationForViewing.php src/Core/Domain/Order/QueryResult
modified product.html.twig in src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/View/

Fred 04 Oct 2021, 19:06

That looks complicated.
AMP have it’s own product controller file here /modules/pkamp/controllers/front/product.php

Try to add your customization there

Stefano Paolucci 18 Oct 2021, 16:56

Hi Fred,
I’ve found ampProductController.php handle file extensions verification and this use ImageManager class to do it.
Now my thought is: which file does it load? Because I’ve two file of ImageManager:
- classes/ImageManager.php
-override/classes/ImageManager.pgp

Fred 19 Oct 2021, 10:12

It loads first the file from “overrides” folder but that file just extends main file classes/ImageManager.php

Stefano Paolucci 21 Oct 2021, 12:10

I’ve override ImageManager so it should works, right?

Fred 21 Oct 2021, 12:38

Yes, I suppose