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

fix: resolve crash caused by images being overwritten with HTML #1687

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

aalemayhu
Copy link
Contributor

This is backwards compatible and should only trigger with the
imageQuizHtmlToAnki card option.

fs.writeFileSync(
`/Users/scanf/Downloads/${file.name}.html`,
convertedImageContents
);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove this debug write out

@@ -14,4 +15,5 @@ export const isZipContentFileSupported = (filename: string) =>
isMarkdownFile(filename) ??
isPlainText(filename) ??
isCSVFile(filename) ??
isPDFFile(filename);
isPDFFile(filename) ??
isImageFile(filename);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow image uploads

This is backwards compatible and should only trigger with the
imageQuizHtmlToAnki card option.
@aalemayhu aalemayhu force-pushed the fix/resolve-image-crasher branch from 94d0e17 to 5d98afc Compare December 21, 2024 07:19
@aalemayhu aalemayhu merged commit 59e34d2 into main Dec 21, 2024
5 checks passed
@aalemayhu aalemayhu deleted the fix/resolve-image-crasher branch December 21, 2024 07:22
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