Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-3905

Improve API usage to provide file content as normal POST parameter

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • None
    • None
    • InstantTranslate
    • High

    Description

      current situation

      In order to use the REST API endpoint /editor/instanttranslateapi/filepretranslate real files (multipart form data) must be given.

      desired changement

      In addition to that, file content should be given as plain POST parameter, so that API users can just place small files as POST content instead uploading files.

      API draft

      Currently /editor/instanttranslateapi/filepretranslate receives only multipart file uploads.

      This issue should add the possibility to POST the following fields to the API endpoint:
      fileName: the filename of the file
      fileData: the raw content of the file

      If binary content should be transferred, the sender must send the request though as multipart form data.

      implementation

      See developer comment, in addition tests should be added.

      Attachments

        Activity

          People

            aleksandar Aleksandar Mitrev
            tlauria Thomas Lauria
            Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: