Skip to Content
avatar image
Former Member

File Upload UI element: Error when uploading; the file name is invalid

Hi ,

I am trying to upload an Excel file via WDA using File Upload UI element. But application is throwing me following exception when i am trying to click submit button.

Error when uploading; the file name is invalid, or the file is too big

System is throwing above error even for a file with size 12 kb.

Does some one knows, the root cause of this error.

Regards

PG

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Nov 03, 2010 at 02:25 AM

    Hello,

    I've sometimes had issues with networked drives not being read correctly - try using the browser "Save page as" functionality - if you can write to the drive - you should be able to read from it.

    You are setting the name/location of the file using the "Browse..." button? And you are using a supported browser?

    Chris

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Chris,

      Thanks for your reply.

      My application does not even goes to the WDDOMODIFYVIEW method, and this error shows up in the browser.

      'Error when uploading; the file name is invalid, or the file is too big'

      So following is the detail:

      I have a File upload UI element and a button, with name submit. No when I run my application, user selects the upload option of File upload UI element. After selecting the file, user presses submit button. In this submit button i am reading the Excel data and trying to store it in database.

      But surprisingly, when user presses submit button, system throws above error without going in Submit action. Then I tried to put Break Point in WDDOMODIFYVIEW method. Since it's called every time. But even system does not goes in this method and throws above error.

      So technically I have no clue about the probable cause of above error.

      Regards

      PG

  • avatar image
    Former Member
    Nov 03, 2010 at 05:34 AM

    Hi PG,

    My Node has the following attributes:

    Node
     |_ FILENAME type string  --> Binded to Filename Property
     |_ CONTENT  type rcf_attachment_content --> Data Property of the Upload UI Element.

    Please check the below code, as the same is working for me with this logic.

    IF lvfname IS NOT INITIAL.
    
    *determine file name without path
        CALL FUNCTION 'TRINT_SPLIT_FILE_AND_PATH'
          EXPORTING
            full_name     = lvfname
          IMPORTING
            stripped_name = lv_stripped_name
            file_path     = lv_file_path
          EXCEPTIONS
            x_error       = 1
            OTHERS        = 2.
    
        IF sy-subrc = 0.
          IF NOT lv_stripped_name IS INITIAL.
            lvfname = lv_stripped_name.
          ENDIF.
        ELSE.
    * Throw error
          lo_api_controller ?= wd_this->wd_get_api( ).
    
          CALL METHOD lo_api_controller->get_message_manager
            RECEIVING
              message_manager = lo_message_manager.
    
    *     report message
          lo_msg = 'Please select proper file'.
          CALL METHOD lo_message_manager->report_t100_message
            EXPORTING
              msgid = '38'
              msgno = '000'
              msgty = 'E'
              p1    = lo_msg.
          EXIT.
    
        ENDIF.

    At the same time, I've made use of the class cl_hrrcf_attachment_bl to maintain the attachments in my requirement.

    Regards,

    -Syed.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Syed,

      Thanks for your code.

      But I did not get, where can i use this and how this code will help me to resolve the problem.

      So can you please explain it in more detail.

      Regards

      PG

  • avatar image
    Former Member
    Nov 04, 2010 at 12:24 PM

    Hi ,

    Anyone can provide some input to resolve this issue?

    Regards

    PG

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 04, 2010 at 01:58 PM

    Does this error happen on all file uploads/using different files? In more than just this one application?

    Add comment
    10|10000 characters needed characters exceeded