I'm assuming the launch.json isn't properly configured?
I'm assuming the launch.json isn't properly configured?


import {v2 as cloudinary} from "Cloudinary"
import fs from "fs"
cloudinary.config({
cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
api_key: process.env.CLOUDINARY_API_KEY,
api_secret: process.env.CLOUDINARY_API_SECRET
});
const uploadOnCloudinary = async (localFilePath) => {
try {
if (!localFilePath) return null
//upload the file onCloudinaryy
const response = await cloudinary.uploader.upload(localFilePath, {
resource_type: "auto"
})
// file has been uploadedsuccessfull
//console.log("file is uploaded onCloudinaryy ", response.url);
fs.unlinkSync(localFilePath)
return response;
} catch (error) {
fs.unlinkSync(localFilePath) // remove the locally saved temporary file as the upload operation got failed
return null;
}
}
export {uploadOnCloudinary}// code
const body = await ctx.req.parseBody()
console.log(body["image"]);
// output
image: File {
lastModified: 1712061871701,
name: 'm5.jpg',
type: 'image/jpeg',
size: 84673
}
npm i itty-durable. There are 3 other projects in the npm registry using itty-durable.
itty-router v3 in there... just a heads up, we've just released v5 - that should bring you a bunch of improvements over the legacy v3: https://itty.dev/itty-router/migrations/v4-v5cache.put's?Date.now() doesn't work?Date.now()fetch('1.1.1.1')? gives me Fetch API cannot load: 1.1.1.1import {v2 as cloudinary} from "Cloudinary"
import fs from "fs"
cloudinary.config({
cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
api_key: process.env.CLOUDINARY_API_KEY,
api_secret: process.env.CLOUDINARY_API_SECRET
});
const uploadOnCloudinary = async (localFilePath) => {
try {
if (!localFilePath) return null
//upload the file onCloudinaryy
const response = await cloudinary.uploader.upload(localFilePath, {
resource_type: "auto"
})
// file has been uploadedsuccessfull
//console.log("file is uploaded onCloudinaryy ", response.url);
fs.unlinkSync(localFilePath)
return response;
} catch (error) {
fs.unlinkSync(localFilePath) // remove the locally saved temporary file as the upload operation got failed
return null;
}
}
export {uploadOnCloudinary}// code
const body = await ctx.req.parseBody()
console.log(body["image"]);
// output
image: File {
lastModified: 1712061871701,
name: 'm5.jpg',
type: 'image/jpeg',
size: 84673
}npm i itty-durableitty-routercache.putDate.now()Date.now()fetch('1.1.1.1')Fetch API cannot load: 1.1.1.1