Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39974

UploadAudioMediaServlet: Problems with file separators in Windows environments

    XMLWordPrintable

    Details

    • 12 status:
      Resolved
    • 11 status:
      Resolved
    • Test Plan:
      Hide

      Create an assessment using audio question. Take assessment as student. Listen to student response as instructor.

      Show
      Create an assessment using audio question. Take assessment as student. Listen to student response as instructor.

      Description

      Affects audio questions, you can't upload audio files in Windows, the comparison of the file paths use different separators, so always throws an error which is only debugged instead of printed:

      https://github.com/sakaiproject/sakai/blob/master/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/servlet/delivery/UploadAudioMediaServlet.java#L104

       

      Example:

      repositoryPath->D:\opt\sakai\sakai\/samigo/answerUploadRepositoryPath/
      mediaLocation->D:\opt\sakai\sakai\samigo\answerUploadRepositoryPath/jsf/upload_tmp/assessment4/question4/student0181/audio_2_4.au
      mediaFile.getCanonicalPath()->D:\opt\sakai\sakai\samigo\answerUploadRepositoryPath\jsf\upload_tmp\assessment4\question4\student0181\audio_2_4.au

      Then, the comparison "if (mediaFile.getCanonicalPath().equals (mediaLocation))" will fail forever, because use different separators.

      https://github.com/sakaiproject/sakai/blob/master/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/servlet/delivery/UploadAudioMediaServlet.java#L107

       

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                farreri Miguel Pellicer
                Reporter:
                farreri Miguel Pellicer
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration