简体   繁体   English

如何处理服务器端从移动应用程序上传的文件?

[英]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.

相关问题 如何处理从Java客户端上传服务器端HTTP文件 - How to handle Server side HTTP file upload from Java client 如何关闭Java Apache服务器HttpRequestHandler.handle()中的套接字以拒绝上传? - how do i close the socket from within the java apache server HttpRequestHandler.handle() to reject an upload? 您如何在服务器端处理HttpUrlConnection? - How do you handle the HttpUrlConnection on server side? 使用ajax和spring portlet将文件从客户端上传到服务器端 - Upload a file from client side to server side with ajax and spring portlet 在java web应用程序中如何从客户端打印服务器文件 - In java web application how to print server file from client side 如何将 JPanel 从应用程序的东侧移动到西侧? - How do I move a JPanel from the East side of an application to the West? 如何将文件从Java servlet上传到Tomcat / webapps中Web服务器上的某个位置 - How do I upload a file from a Java servlet to a location on a web server within Tomcat/webapps 如何将 PDF 文件上传到 Parse 服务器? - How do I upload a PDF file to Parse server? 如何处理从Web服务上传的文件 - How to handle file upload from web service 如何进行循环以从服务器(在客户端-服务器应用程序中)读取/下载文件? - How do I make a loop to read/download file from server (in client-server application)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM