Announcement

Collapse
No announcement yet.

Import Document(File Name) causes error when File name contains Spaces

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Import Document(File Name) causes error when File name contains Spaces

    I am trying to create a upload tool for my end users so that they can upload excel or csv doucements and use that data in those documents to fill in reports.

    The problem I am having is that I can't seem to call the file name when it has been uploaded.
    The upload field is called "file_selector".
    I tried calling it with {file_selector} but that did not work.
    I tried calling it with $this->file_selector_ul_name that works but only if the file name contains no spaces.
    If the file contains spaces script case adds SC_SPACE__ in place of the space.

    In the picture you can see the first line I print {file_selector} to screen.
    In the second line I print $this->file_selector_ul_name to screen.
    Then I get the error that the file is missing, but the file is not since I can see it on the server so it did upload the file it just can't read it.
    When I remove all the spaces from the files name it reads the file and prints the data to the screen.
Working...
X