Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Spring MVC - File upload problem
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Arjan  
View profile  
 More options Apr 20, 3:25 pm
From: Arjan <huij...@gmail.com>
Date: Mon, 20 Apr 2009 12:25:54 -0700 (PDT)
Local: Mon, Apr 20 2009 3:25 pm
Subject: Spring MVC - File upload problem
Hi all,

I am creating a form that allows the user to upload an image. I use
Spring MVC. I have configured the mulipart resolved as follows:

<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
        <property name="maxUploadSize" value="2000000" />
</bean>

However, this results in an exception because it tries to write a temp
file. I know the Commons File Upload library used support streaming
without actually creating a temp file. Can someome tell me how I can
configure this in Spring MVC?

Thanks in advance!

Arjan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pjesi  
View profile  
 More options May 12, 5:05 pm
From: pjesi <vidarsv...@gmail.com>
Date: Tue, 12 May 2009 14:05:58 -0700 (PDT)
Local: Tues, May 12 2009 5:05 pm
Subject: Re: Spring MVC - File upload problem
Hi

CommonsMultipartResolver does write to the filesystem, which is not
what Google wants. I'm working on a special MultipartResolver for the
appengine to resolve this issue. Let me know if you are interested.

Cheers
Višar

On Apr 20, 9:25 pm, Arjan <huij...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Višar Svansson  
View profile  
 More options Jun 25, 12:45 pm
From: Višar Svansson <vidarsv...@gmail.com>
Date: Thu, 25 Jun 2009 18:45:23 +0200
Local: Thurs, Jun 25 2009 12:45 pm
Subject: Re: Spring MVC - File upload problem

Hi
Check out http://github.com/pjesi/springextras

You can use is.hax.spring.web.multipart.StreamingMultipartResolver
I am still working on this so watch for updates.

Cheers,
Višar


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zee  
View profile  
 More options Jul 2, 5:30 pm
From: zee <zenma...@gmail.com>
Date: Thu, 2 Jul 2009 14:30:03 -0700 (PDT)
Local: Thurs, Jul 2 2009 5:30 pm
Subject: Re: Spring MVC - File upload problem

Is there any example on how to use StreamingMultipartResolver in
Spring MVC based web application
(actually grails) like sample xml file configuration settings to
override default spring behaviour?

I am facing the same problem using google app engine because the
framework based on Spring MVC
uses spring file uploads for multipart form requests.

On Jun 25, 5:45 pm, Višar Svansson <vidarsv...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Višar Svansson  
View profile  
 More options Jul 5, 5:06 am
From: Višar Svansson <vidarsv...@gmail.com>
Date: Sun, 5 Jul 2009 11:06:01 +0200
Local: Sun, Jul 5 2009 5:06 am
Subject: Re: [appengine-java] Re: Spring MVC - File upload problem

Hi
Here is my configuration using StreamingMultipartResolver in my AppEngine
MVC application.

In my servlet context file:

    <bean id="multipartResolver"
          class="is.hax.spring.web.multipart.StreamingMultipartResolver">
    </bean>

Then in my model:

    private MultipartFile picture;
    // getters and setters

And finally in the contoller:

    public String uploadPicture(@ModelAttribute("picture") Picture picture)
 {
        MultipartFile file = picture.getPicture();
        byte[] rawData = file.getBytes();
        // ...

Hope this helps.
Višar


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google