Skip to content
New issue

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

[feats] option to ignore extension check; fix for long URLs and extensions, correct pathname hash function #52

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Alex01d
Copy link
Contributor

@Alex01d Alex01d commented Sep 14, 2022

I faced a situation where I had to import 100% correct data from contentful, but some media links were like https://images.ctfassets.net/a6f2hu560hd9/5BKzFyXMhEDZjuTmbnMAMa/2e2f45cd07ef92dc1fd4b6112bfdedf4/30-1024x683.jpg_w_2540_h_1300_fm_jpg_fl_progressive or with no extension at all. So I've added this option.

@Alex01d Alex01d changed the title [feat] ignore extension check [feats] option to ignore extension check; fix for long URLs and extensions, correct pathname hash function Sep 15, 2022
@Alex01d
Copy link
Contributor Author

Alex01d commented Sep 15, 2022

Feat 2: truncate name and extension if it's too long for db: strapi/strapi#13097
I faced it with the URL https://images.ctfassets.net/a6f2hu560hd9/479kItADdKXBqFnEXoQQHx/eaa1fe17e960a7b7d144ce6767de7fbf/23421315.com__nc_ohc_qITFOsQmxpEAX-HjDR6_edm_AABBvjUBAAAA_ccb_7-4_oh_ce3d8391093369f5847d8d1b345bb12e_oe_60FFC3A7__nc_sid_83d603
Also hash function is now correct (instead of just file name with no extension). It shouldn't lead to collisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant