File name rules #643
lukasvalach
started this conversation in
General
Replies: 2 comments
-
If the file failed, then I can see this in the cosmos db, data explorer. |
Beta Was this translation helpful? Give feedback.
0 replies
-
What I've done was to get the actual blob path from file_uri for a workaround in the enrichment process. Waiting for better approach.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Is there a specific filename policy in place? I came across this topic here: link to Microsoft's naming and referencing containers, blobs, and metadata, but it seems that in some cases, these rules may not suffice. Are you planning to implement additional functions to address this? Some of our customers have complex file naming policies, resulting in many files ending up in an error state. I've attempted to implement a short function like so:
const checkFileName = (fileName) => { const reservedCharactersRegex = /[<>"\/\\|?*& ]/g; const validFileName = fileName.replace(reservedCharactersRegex, '_') .replace(/ /g, "_") .replace(/-/g, '_') .replace(/–/g, '_') .normalize("NFD") .replace(/[\u0300-\u036f]/g, ""); return validFileName; };
This function is designed to handle suspicious characters found in files, which often lead to error states. However, it doesn't work in all cases. While I understand that filenames should generally adhere to certain rules, renaming hundreds of files can be quite challenging for customers.
Additionally, sometimes files get stuck in an "Uploaded" state and won't change.
If you have any advice or recommendations, please let me know. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions