We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We retrieve images from an external source via Guzzle and indexed them in V3 via
$asset = Craft::$app->assetIndexer->indexFile($volume, 'examples/' );
The Asset Index now looks like this:
Source:
$listing = new FsListing([ 'dirname' => $path, 'basename' => pathinfo($path, PATHINFO_BASENAME), 'type' => 'file', 'dateModified' => $fs->getDateModified($path), 'fileSize' => $fs->getFileSize($path), ]);
Looks like it should be 'dirname' => dirname($path), ?
'dirname' => dirname($path),
PS. The $sessionId is now required, although the doc block says it is optional.
Index directory matches real life.
Creates a directory with the filename, which does not exist.
/Mel
4.0.3
8.0.15
Windows 10 Pro
MySQL 5.7.14
Imagick 3.7.0 (ImageMagick 7.1.0-18)
No response
The text was updated successfully, but these errors were encountered:
Not really sure I’m following the issue. Do you mind submitting a PR with the fix?
Sorry, something went wrong.
@brandonkelly Not familiar with creating PRs, but i think it is just one line:
cms/src/services/AssetIndexer.php
Line 495 in 1c15768
Patching this to 'dirname' => dirname($path) fixes the issue for me (local filesystem, if that matters)
'dirname' => dirname($path)
And it looks like the comment in line 482 (optional) and the method signature (no default for $sessionId) in line 491 do not match.
85a4322
Alright thanks! Fixed for the next release.
Craft 4.0.4 is out now with that fix.
No branches or pull requests
What happened?
Description
We retrieve images from an external source via Guzzle and indexed them in V3 via
$asset = Craft::$app->assetIndexer->indexFile($volume, 'examples/' );
The Asset Index now looks like this:
Source:
Looks like it should be
'dirname' => dirname($path),
?PS.
The $sessionId is now required, although the doc block says it is optional.
Steps to reproduce
Expected behavior
Index directory matches real life.
Actual behavior
Creates a directory with the filename, which does not exist.
/Mel
Craft CMS version
4.0.3
PHP version
8.0.15
Operating system and version
Windows 10 Pro
Database type and version
MySQL 5.7.14
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.0-18)
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: