Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-31943

Unable to post files from JSONWS API page

Details

    Description

      It is not possible to upload files from API page:

      1. Log in as an administrator
      2. Go to add-file-entry method: {domain}

        /api/jsonws?signature=%2Fdlapp%2Fadd-file-entry-9-repositoryId-folderId-sourceFileName-mimeType-title-description-changeLog-file-serviceContext

      3. enter data, as follows, and select any file to upload:
        repositoryId: Guest groupId
        folderId: 0
        sourceFileName: some string, like "Test"
        mimeType: file extension, like "txt"
        title: string
        description: string, optional
        changeLog: string, optional
        Result: API call fails: "No JSON web service action with path /dlapp/add-file-entry and method null for /"
        Expected: Results tab shows the JSON object that is returned after uploading the file. Go to Admin > Content > Documents and Media and file uploaded should be listed.

      The reason for this is that API page does not really submit a multipart POST request, but a regular one, and the File attribute is therefore missing, and method can not be matched.

      Attachments

        Issue Links

          Activity

            People

              brian.chan Brian Chan
              igor.spasic Igor Spasic (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                7 years, 35 weeks, 4 days ago

                Packages

                  Version Package
                  6.2.5 CE GA6
                  6.2.X EE
                  7.0.0 M5