简体   繁体   English

没有HTML表单的Apache Commons FileUpload

[英]Apache Commons FileUpload without HTML Form

IS it possible to use Apache Commons FileUpload without requiring the HTML form? 是否可以在不需要HTML表单的情况下使用Apache Commons FileUpload?

I'm trying to upload a single specific file each time and uploading through my Java application. 我试图每次都上传一个特定的文件,并通过我的Java应用程序上传。

Is this possible? 这可能吗?

Do you mind giving us more details on your requirements and environment (Sever, client, personal server, corporate machine,...)? 您是否介意向我们提供有关您的要求和环境(服务器,客户端,个人服务器,公司机器等)的更多详细信息?
Are you allowed to set up a socket connection on the server? 是否允许在服务器上建立套接字连接?
You tagged your question with "FTP". 您用“ FTP”标记了您的问题。 Is a FTP upload a feasible solution? FTP上传可行吗?

If you use FTP(S)/SFTP you could go for Apache Commons . 如果使用FTP(S)/ SFTP,则可以使用Apache Commons

Edit 编辑

The requirement for an HTML form depends on the server side: If the server expects a file upload on the basis of the HTTP protocol (ie HTTP 1.x ) then you must submit a proper HTML form. HTML表单的要求取决于服务器端:如果服务器期望基于HTTP协议(即HTTP 1.x )上传文件,则必须提交正确的HTML表单。

Hint: In HTML 4.x it required some client programming to have a progressbar in a file upload. 提示:在HTML 4.x中,需要一些客户端编程才能在文件上传中包含进度条。 With HTML 5 I am not (yet) an expert. 使用HTML 5,我还不是专家。

Keep us posted on your progress/success. 向我们发布您的进度/成功情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM