[英]How do I handle a file upload from a mobile application on the server side?
I want to prototype a server component that accepts and handles file uploads from a mobile application (should not matter what platform the phone's running). 我想对服务器组件进行原型设计,该组件可以接受并处理来自移动应用程序的文件上传(无论手机运行在哪个平台上)。 The files in question are most likely just photos, so the file size should not be that big.
有问题的文件很可能只是照片,因此文件大小不应太大。
I'm looking for technology/tool/library recommendations or pointers. 我在寻找技术/工具/库建议或指示。 I'm not sure where to start.
我不确定从哪里开始。 I haven't set up anything on the server-side yet so I'm not sure what I don't know.
我还没有在服务器端设置任何东西,所以我不确定我不知道什么。 Something Java-related would definitely ease me into setting up the prototype quickly.
某些与Java相关的事情肯定会让我快速建立原型。
Thanks in advance. 提前致谢。
You can use servlet on server-side to receive files, to generate unique names for these files and keep them preferable on file system (not on database). 您可以在服务器端使用servlet来接收文件,为这些文件生成唯一的名称,并使它们在文件系统(而不是数据库)上更可取。 For example you can see http://www.servletworld.com/servlet-tutorials/servlet-file-upload-example.html
例如,您可以看到http://www.servletworld.com/servlet-tutorials/servlet-file-upload-example.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.