gatsby icon indicating copy to clipboard operation
gatsby copied to clipboard

fix(gatsby-core-utils): decode uri-encode filename for remote file

Open cometkim opened this issue 3 years ago • 4 comments

Description

Tried decode url-encoded filename before to store remote file. So it can be served properly via generated publicURL

Related Issues

Fixes #35636

cometkim avatar May 12 '22 05:05 cometkim

This looks like something we would like to add test case for (to prevent regression in the future)

pieh avatar May 16 '22 15:05 pieh

@pieh do you think is a unit test ok? or should it be e2e?

cometkim avatar May 16 '22 17:05 cometkim

@pieh do you think is a unit test ok? or should it be e2e?

e2e would be most welcome (that gives highest level of confidence), but I think unit test will be enough given that https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-core-utils/src/tests/fetch-remote-file.js tests entire fetchRemoteFile pipeline (not just naming helper function)

pieh avatar May 16 '22 18:05 pieh

@pieh added a test, but it seems some unrelated unit test is failing in the CI

cometkim avatar Sep 13 '22 07:09 cometkim

Fixed to handle file directory correctly in other cases @Boronare mentioned

(No idea about test setup failure, I'll keep rebasing)

cometkim avatar Nov 03 '22 07:11 cometkim

@pieh @LekoArts could you help me to merge this change?

cometkim avatar Nov 05 '22 07:11 cometkim

ok it now pass all tests except Cloud Tests

cometkim avatar Nov 11 '22 07:11 cometkim

Can it be merge soon?

cometkim avatar Nov 15 '22 03:11 cometkim