Announcement Announcement Module
No announcement yet.
file upload Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • file upload


    Is it possible to add file type to persistent class and next generate automatic controller with file upload support ?
    If yes, how can I do it ?

    I've tried to "add field string something -type" but this does not work :>

  • #2

    Roo currently includes the Apache Commons FileUpload library to get you started on the file upload functionality of your Web page.

    There are a number of different scenarios which users choose to handle file uploads. For example, you could upload a file and store it in a resources directory on your Web server and just store the local URL, filename, extension, etc in your database, or you could serialize (if possible) the complete file into a LOB field and store it as binary data in the database. It depends on your application.

    This is the reason (apart from finding the time ) why we have not yet implemented further support for file uploads through Spring MVC. So you would need to customize your application a little bit. You can use the new push-in functionality to make sure Roo will not overwrite your code in the aspects.

    To get you started, the Spring documentation has a nice chapter explaining your options here:

    Hope this helps.