File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
AdobeStockImage/Model/Storage Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1111use Magento \Framework \App \Filesystem \DirectoryList ;
1212use Magento \Framework \Exception \AlreadyExistsException ;
1313use Magento \Framework \Exception \FileSystemException ;
14+ use Magento \Framework \Exception \InputException ;
1415use Magento \Framework \Filesystem ;
1516use Magento \Framework \Filesystem \Driver \Https ;
1617use Magento \Framework \Filesystem \DriverInterface ;
@@ -53,14 +54,15 @@ public function __construct(
5354 * @return string
5455 * @throws AlreadyExistsException
5556 * @throws FileSystemException
57+ * @throws InputException
5658 */
5759 public function execute (string $ imageUrl , string $ destinationPath = '' ) : string
5860 {
5961 $ mediaDirectory = $ this ->filesystem ->getDirectoryWrite (DirectoryList::MEDIA );
6062 $ maxFilenameLength = self ::MAX_LENGTH ;
6163
6264 if (strlen ($ destinationPath ) > $ maxFilenameLength ) {
63- throw new AlreadyExistsException (
65+ throw new InputException (
6466 __ ('Destination path is too long; must be %1 characters or less ' , $ maxFilenameLength )
6567 );
6668 }
You can’t perform that action at this time.
0 commit comments