Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E704 Topic 9 Question 51 Discussion

Actual exam question for Adobe's AD0-E704 exam
Question #: 51
Topic #: 9
[All AD0-E704 Questions]

You are creating a module lo enable customers to attach an image file to the quote items while adding a product to the cart. To save development time, you want to build on top of functionality provided by the class \Magento\Catalog\Model\ImageUploader as much as possible.

The class constructor signature is:

What do you do to process the uploaded file?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Nicolette
2 months ago
Haha, you know what they say - 'If it ain't broke, don't fix it!' But in this case, it sounds like the existing ImageUploader might not be the perfect fit. Gotta get creative, right?
upvoted 0 times
...
Youlanda
2 months ago
I'm not sure about option B. If the catalog ImageUploader can't be used for quote items, that seems like a code smell to me. I'd try to find a way to extend the existing functionality.
upvoted 0 times
Ona
25 days ago
I agree, extending the existing functionality seems like the best approach to maintain code consistency.
upvoted 0 times
...
Alise
26 days ago
C) Create a custom Class implementing \Magento\Catalog\Model\ImageUploaderInterface and add it to the $uploaders argument of the UploaderPoolinterface via di.xml
upvoted 0 times
...
Werner
2 months ago
A) Configure a plugin for the method \Magento\Catalog\Model\ImageUploader: moveFileFromTmp() in di. xml
upvoted 0 times
...
...
Lou
2 months ago
I personally think option D) Configure a Virtual type based on \Magento\Catalog\Model\ImageUploader Specifying $baseTmpPath, $basePath and SallowedExtensions is the most efficient solution.
upvoted 0 times
...
Kristian
2 months ago
Option D sounds like a good idea too. Configuring a virtual type based on the existing ImageUploader class could save a lot of time and effort.
upvoted 0 times
Richelle
2 months ago
Option D sounds like a good idea too. Configuring a virtual type based on the existing ImageUploader class could save a lot of time and effort.
upvoted 0 times
...
Irma
2 months ago
C) Create a custom Class implementing \Magento\Catalog\Model\ImageUploaderInterface and add it to the $uploaders argument of the UploaderPoolinterface via di.xml
upvoted 0 times
...
My
2 months ago
A) Configure a plugin for the method \Magento\Catalog\Model\ImageUploader: moveFileFromTmp() in di. xml
upvoted 0 times
...
...
Aimee
3 months ago
I disagree with Toshia. I believe option C) Create a custom Class implementing \Magento\Catalog\Model\ImageUploaderInterface and add it to the $uploaders argument of the UploaderPoolinterface via di.xml is the way to go.
upvoted 0 times
...
Toshia
3 months ago
I think option A) Configure a plugin for the method \Magento\Catalog\Model\ImageUploader: moveFileFromTmp() in di.xml is the best choice.
upvoted 0 times
...
Ernestine
3 months ago
I think option C is the way to go. Creating a custom class that implements the ImageUploaderInterface and adding it to the UploaderPool seems like the most flexible approach.
upvoted 0 times
Johnna
1 months ago
D) Configure a Virtual type based on \\Magento\\Catalog\\Model\\ImageUploader Specifying $baseTmpPath, $basePath and SallowedExtensions
upvoted 0 times
...
Ettie
2 months ago
C) Create a custom Class implementing \\Magento\\Catalog\\Model\\ImageUploaderInterface and add it to the $uploaders argument of the UploaderPoolinterface via di.xml
upvoted 0 times
...
Wynell
2 months ago
B) Create a custom implementation because the catalog imageUploader can not be used to for files associated with quote items
upvoted 0 times
...
Katy
2 months ago
A) Configure a plugin for the method \\Magento\\Catalog\\Model\\ImageUploader: moveFileFromTmp() in di. xml
upvoted 0 times
...
...

Save Cancel