Welcome, Guest
Username: Password: Remember me

TOPIC: Saving filenames, paths with backslashes

Saving filenames, paths with backslashes 30 Dec 2012 18:02 #6308

  • gdpodesta
  • gdpodesta's Avatar
  • Offline
  • Senior Member
  • Posts: 75
  • Thank you received: 8
  • Karma: -42
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
  1. The text/string field that uses backslashes is not saving the backslashes to the DB properly.
  2. 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.
  3. 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.
The administrator has disabled public write access.

Re: Saving filenames, paths with backslashes 04 Jan 2013 20:22 #6350

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Could you post your regex and handler details? I reckon there's an issue with the slashes in the regex or some missing 'valid' chars.

A couple of questions:
  1. have you any JS errors?
  2. Version 2.0b or 1.5? Please post your config?
Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Saving filenames, paths with backslashes 04 Jan 2013 20:32 #6351

  • gdpodesta
  • gdpodesta's Avatar
  • Offline
  • Senior Member
  • Posts: 75
  • Thank you received: 8
  • Karma: -42
Don't have it installed yet. Just try a new component with the builder and use a string field to contain a file name or a folder name. Using the validation popups in the builder, you can specify a file name, and test it there. When you run the component in the sandbox, the regex fails (or at least the validation errors appear when a valid file name is put in there)
The administrator has disabled public write access.

Re: Saving filenames, paths with backslashes 04 Jan 2013 20:37 #6352

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
I don't have FF to access builder ATM. If I can see your config details and the regex I should be able to help though...

Can you grab it from the builder?
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
Time to create page: 0.084 seconds

Get Started