I'm having a terrible time getting data containing filenames and paths to save properly. I've also had no luck using custom Regex properties, so am seeking some guidance.
My Problems
- The text/string field that uses backslashes is not saving the backslashes to the DB properly.
- The RegEx for file does not seem to be correct - it seems to depend on a drive, or perhaps an uploaded file. When setting it in the properties, the test works, but running from the sandbox any kind of valid path or file information failes, so I can't save it.
- I've tried the provided file and custom regex, as well as tried using different handler names
My Requirements (in case it matters):
- Uploading is not part of the consideration. The component is only storing metadata about files located elsewhere, so this feature is neither needed or allowed.
- We have to separately store the base file name, the relative path to the file (without the drive), and the relative url
i.e.:
filename: myvideo.mp4
file path: customervideos\customername\
file url: acme/streaming/
(note: no preceding backslash allowed, but trailing backslash required)
This may seem strange, but with the aliases, virtual folders, cross domains, and a bunch of reasons that don't matter here, the only thing that remains consistent is the base file name, with URL information varying on where and how the file is used and the physical location depending on which SAN is currently in use.