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

Add an option to remove the file extension from image uploads #412

Closed
wwilsman opened this issue Jul 14, 2021 · 0 comments · Fixed by #434
Closed

Add an option to remove the file extension from image uploads #412

wwilsman opened this issue Jul 14, 2021 · 0 comments · Fixed by #434

Comments

@wwilsman
Copy link
Contributor

When using the percy upload command, the file extension is kept in snapshot names. This is because you can have multiple files with the same name but different extensions, i.e. image.png, image.jpg, image.jpeg. If file extensions were automatically removed, only the first upload will work and the following uploads will return a duplicate snapshot API error.

However, having matching filenames with differing extensions probably isn't very common. More likely what is common, is the filenames without extensions are intended to be snapshot names. With intentional names, the duplicate snapshot API error is doing its job.

Rather than change the behavior and suddenly rename all existing snapshots for current users (resulting in "new" snapshots and broken comparisons), we can add an opt-in flag and/or config file option to strip extensions from the resulting snapshot name. This could be a boolean option, or maybe a more complicated config option for more custom behaviors.

samarsault pushed a commit that referenced this issue Mar 3, 2023
Bumps [@percy/sdk-utils](https://github.com/percy/cli/tree/HEAD/packages/sdk-utils) from 1.0.0-beta.67 to 1.0.0-beta.68.
- [Release notes](https://github.com/percy/cli/releases)
- [Commits](https://github.com/percy/cli/commits/v1.0.0-beta.68/packages/sdk-utils)

---
updated-dependencies:
- dependency-name: "@percy/sdk-utils"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 a pull request may close this issue.

1 participant