Results 1 to 4 of 4

Thread: Downloading a file using spring multipart

  1. #1
    Join Date
    Jun 2012
    Posts
    2

    Default Downloading a file using spring multipart

    I am a beginner in spring mvc. In my project I have a requirement to download a content from multipart form using spring.

    I found a number of examples for file upload but there is nothing related to download except MultipartAwareFormHttpMessageConverter

    Can anybody tell me how to use this class.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Ehrm not sure what you mean, but downloading is nothing more than streaming somethinig directly to the response, set the appropriate content type etc. There are numerous samples around the web for that. So not sure what that has to do with multipart forms etc...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jun 2012
    Posts
    2

    Default

    Actually application is recording user's talk over phone and passing these databytes to my controller as multipart/form-data in request. Requirement is to extract these databytes and write it into file system.

    Is this possible using spring multiparts?

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Which is UPLOAD not DOWNLOAD... So use the documented solutions as described elsewhere and which you already found. Simply write the received file to disk...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •