next.js / packages /next /src /shared /lib /encode-uri-path.ts
AbdulElahGwaith's picture
Upload folder using huggingface_hub
b91e262 verified
export function encodeURIPath(file: string) {
return file
.split('/')
.map((p) => encodeURIComponent(p))
.join('/')
}