Grails使用不同的类来处理上传文件 [英] Different classes grails use to handle upload files

查看:103
本文介绍了Grails使用不同的类来处理上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个处理fileupload的grails控制器。
我在windows和ubuntu上的glassfish上部署了应用程序。



在windows部署中, $ b $的请求对象b

  request.getFile(filename)

是commons.CommonsMultipartFile



而在ubuntu部署中,请求的类型为support.DefaultMultipart

这种不同的行为?
有没有办法使它保持一致?


应用程序服务器是glassfish3.1.2

解决方案

这个问题在我将windows 2和ubuntu上的glassfish从3.1.2升级到glassfish 4后解决了。

可能有其他一些其他的解决这个问题的方法。但我通过升级glassfish解决了这个问题。


I have a grails controller which handle fileupload. I deployed the application on glassfish in windows and in ubuntu.

On windows deployment, the request object of

request.getFile("filename")

is of type commons.CommonsMultipartFile

while on ubuntu deployment the request is of type support.DefaultMultipart

What causes this different behavour? Is there a way to make it consistent?

The application server is glassfish3.1.2

解决方案

the problem solved after I upgraded the glassfish from 3.1.2 to glassfish 4 in windows and ubuntu.

there may be some other ways to solve this. but i solved this by upgrading the glassfish.

这篇关于Grails使用不同的类来处理上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆