carnet panel contact

This commit is contained in:
alma 2025-04-20 20:58:24 +02:00
parent e095592e19
commit 3fcabdde25

View File

@ -149,7 +149,9 @@ export async function PUT(request: Request) {
const path = `/files/${username}/Private/${folder}/${title}`;
console.log('Updating file at path:', path);
await client.putFileContents(path, content);
// Set the correct content type based on file extension
const contentType = title.endsWith('.vcf') ? 'text/vcard' : 'text/markdown';
await client.putFileContents(path, content, { contentType });
// Get the updated file details
const fileDetails = await client.stat(path);