@MultipartForm How to get the original file name?

前端 未结 3 1988
猫巷女王i
猫巷女王i 2021-02-19 23:42

I am using jboss\'s rest-easy multipart provider for importing a file. I read here http://docs.jboss.org/resteasy/docs/1.0.0.GA/userguide/html/Content_Marshalling_Providers.html

3条回答
  •  礼貌的吻别
    2021-02-20 00:37

    It seems that Isim is right, but there is a workaround.

    Create a hidden field in your form and update its value with the selected file's name. When the form is submitted, the filename will be submitted as a @FormParam.

    Here is some code you could need (jquery required).

    
    
    
    
    

提交回复
热议问题