What happended?
The current implementation of the S3 file provider ignores the directory portion of filename when generating the object key.
For example:
{
filename: "vendor_123/logo.png"
}
The provider parses the filename but only uses parsedFilename.name and parsedFilename.ext, resulting in an object key similar to:
instead of:
vendor_123/logo-<timestamp>.png
As a result, any directory structure supplied by the caller is lost.
Expected behavior
If filename contains a directory, it should be preserved when constructing the object key.
For example:
Input:
filename: "vendor_123/logo.png"
Current key:
Expected key:
vendor_123/logo-1752345678901.png
If filename does not contain a directory, behavior should remain unchanged.
Actual behavior
For example:
{
filename: "vendor_123/logo.png"
}
The provider parses the filename but only uses parsedFilename.name and parsedFilename.ext, resulting in an object key similar to:
instead of:
vendor_123/logo-<timestamp>.png
Link to reproduction repo
What happended?
The current implementation of the S3 file provider ignores the directory portion of filename when generating the object key.
For example:
The provider parses the filename but only uses parsedFilename.name and parsedFilename.ext, resulting in an object key similar to:
instead of:
As a result, any directory structure supplied by the caller is lost.
Expected behavior
If filename contains a directory, it should be preserved when constructing the object key.
For example:
Input:
filename: "vendor_123/logo.png"Current key:
Expected key:
If filename does not contain a directory, behavior should remain unchanged.
Actual behavior
For example:
The provider parses the filename but only uses parsedFilename.name and parsedFilename.ext, resulting in an object key similar to:
instead of:
Link to reproduction repo