vc-platform
vc-platform copied to clipboard
Added mime enhancement for file type with same extension but different content type
…t header
Description This is a enhancement of validating the image/pdf files listed as part of white list categorise to actually validate the content-type associated with it.
Sometimes, a invalid file can be uploaded even though the extension passes the white list extensions.
References
QA-test:
Jira-link:
Artifact URL:
Review task https://virtocommerce.atlassian.net/browse/VP-7852 has been created
To implement this functionality:
- Develop a custom module tailored to your specific requirements.
- Utilize the BlobCreatedEvent subscription mechanism. Added in https://github.com/VirtoCommerce/vc-module-assets/pull/19.
- Enhance the implementation by incorporating validation checks to ensure that the content type aligns with the expected content, thereby throwing exceptions as necessary to handle mismatches.