Skip to content

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

Open
Alex01d wants to merge 2 commits into
Baboo7:masterfrom
Alex01d:master
Open

[feats] option to ignore extension check; fix for long URLs and extensions, correct pathname hash function#52
Alex01d wants to merge 2 commits into
Baboo7:masterfrom
Alex01d:master

Conversation

@Alex01d

@Alex01d Alex01d commented Sep 14, 2022

Copy link
Copy Markdown
Contributor

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

Alex01d commented Sep 15, 2022

Copy link
Copy Markdown
Contributor Author

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