refatoring image upload error

This commit is contained in:
2025-03-24 13:38:35 -06:00
parent 408246be7f
commit 32e77d5f4f
6 changed files with 13 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ export const useUpdateImageSettingsForAssignment = ({
useEffect(() => {
if (!enable_images) {
console.log("not uploading images, FILE_POLLING is not set to true");
console.log("not uploading images, NEXT_PUBLIC_ENABLE_FILE_SYNC is not set to true");
return;
}
@@ -70,6 +70,7 @@ export const useAddNewImagesToCanvasMutation = () => {
return useMutation({
mutationFn: async ({ markdownString }: { markdownString: string }) => {
const imageSources = extractImageSources(markdownString);
// console.log("original image urls", imageSources);
const newImages = imageSources.filter((source) =>
settings.assets.every((a) => a.sourceUrl !== source)
);