Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-895

Groovlets: File upload support

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • Groovlet / GSP
    • None
    • Patch

    Description

      I belive that file upload support would be a nice feature of Groovlets.

      General idea:
      Groovlets Servlet checks if type of HTTP request is multipart (i.e. confirms RFC 1867 (http://www.ietf.org/rfc/rfc1867.txt) . If so, it parses its content, stores files on disk and sets them as implicit objects in ServlerBinding. What is more, it decodes parameter values form multipart content and stores them in 'params' implicit object. User who develop Groovlet scripts can handle uploaded files very easy (I belive this is a general idea behind Groovy, in general).

      Implementation:
      It is quite easy to implement this mechanism using Commons FileUpload (http://jakarta.apache.org/commons/fileupload/) which is mature and reliable library for processing RFC 1867 multipart HTTP requests.

      What do you think about this?

      Attachments

        1. menu.groovy
          0.4 kB
          Tomasz Blachowicz
        2. upload.groovy
          0.8 kB
          Tomasz Blachowicz
        3. GROOVY-895.patch
          9 kB
          Tomasz Blachowicz

        Activity

          People

            sormuras sormuras
            tblachowicz Tomasz Blachowicz
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: