You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the issue has not already been raised
Issue
Hello, i'm trying to upload files on my nextjs 14.0.4 app with fastify/busboy, however, while the files upload in the right repo, with the right name and right extension, they are unsuable "Not a JPEG file: starts with 0xef 0xbf", exemple with an jpeg file. I double checked the files are fine. It's my first nextjs app, any help would be greatly aprreciated. Thanks for your time.
import { PrismaClient } from '@prisma/client';
const Busboy = require('@fastify/busboy');
import fs from 'fs';
import path from 'path';
import os from 'os';
} catch (error) {
console.error('Erreur lors de la création de la ressource:', error);
res.status(500).json({
success: false,
message: 'Erreur lors de la création de la ressource',
});
} finally {
await prisma.$disconnect();
}
}
Prerequisites
Issue
Hello, i'm trying to upload files on my nextjs 14.0.4 app with fastify/busboy, however, while the files upload in the right repo, with the right name and right extension, they are unsuable "Not a JPEG file: starts with 0xef 0xbf", exemple with an jpeg file. I double checked the files are fine. It's my first nextjs app, any help would be greatly aprreciated. Thanks for your time.
import { PrismaClient } from '@prisma/client';
const Busboy = require('@fastify/busboy');
import fs from 'fs';
import path from 'path';
import os from 'os';
const prisma = new PrismaClient();
export const createRessource = async (req, res) => {
try {
} catch (error) {
console.error('Erreur lors de la création de la ressource:', error);
res.status(500).json({
success: false,
message: 'Erreur lors de la création de la ressource',
});
} finally {
await prisma.$disconnect();
}
}
My Environment
The text was updated successfully, but these errors were encountered: