I hereby claim:
- I am codiini on github.
- I am iniubong (https://keybase.io/iniubong) on keybase.
- I have a public key ASCGYqXjzjhk45J-NekWqfX8pvH3vxLPDTKQJKT83gOK-go
To claim this, I am signing this object:
| import os | |
| import re | |
| def find_unused_images(asset_dir, code_dir): | |
| # Collect all image files (common extensions: jpg, png, gif, svg, webp) | |
| image_extensions = ('.jpg', '.jpeg', '.png', '.gif', '.svg', '.webp') | |
| images = [os.path.join(dp, f) for dp, dn, filenames in os.walk(asset_dir) for f in filenames if f.lower().endswith(image_extensions)] | |
| unused_images = [] | |
| import { collection } from "../utils/mongodb" | |
| export default async function handler(req, res) { | |
| try { | |
| //Accept asset Id to search db for image with a status type of moderation | |
| const moderatedImage = await collection.findOne({ | |
| asset_id: req.body.asset_id, | |
| notification_type: "moderation", | |
| }) | |
| //if the image is found, return the image |
| .wrapper { | |
| padding-top: 50px; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .title { | |
| font-size: 2em; |
| import React, { useState } from "react" | |
| import * as styles from "../components/index.module.css" | |
| const IndexPage = () => { | |
| const [file, setFile] = useState() | |
| const [uploadedImg, setUploadedImg] = useState() | |
| const [moderatedImage, setModeratedImage] = useState() | |
| const [isLoading, setIsLoading] = useState(false) | |
| const [isError, setIsError] = useState(false) |
| //first require all dependencies | |
| require("dotenv").config() | |
| const cloudinary = require("cloudinary").v2 | |
| let streamifier = require("streamifier") | |
| //Here we'll configure the cloudinary API | |
| cloudinary.config({ | |
| cloud_name: process.env.CLOUDINARY_CLOUD_NAME, | |
| api_key: process.env.CLOUDINARY_API_KEY, | |
| api_secret: process.env.CLOUDINARY_API_SECRET, | |
| }) |
I hereby claim:
To claim this, I am signing this object: