JAVA 怎么实现跨域上传文件
黄舟
黄舟 2017-04-18 10:29:28
0
3
528

如题,比如说我在192.168.1.1服务器上上传一个图片,后台接收图片后把图片存到192.168.2.2服务器上


根据各位大牛的回答,我知道的实现方式有两种
一是1服务器上的服务嵌套2服务器的页面,上传之后自动到2服务器上,但是这种要维护两个服务器的服务。
二是1服务器上上传的文件通过scp到2服务器上,但是需要2服务器的用户名、密码,密码明文感觉不太安全,还需要一套加密的东西。

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(3)
巴扎黑

Your problem is about transferring files between two servers.

There are so many ways to transfer files, such as HTTPFTP.

The simplest and most common way is HTTP. If you have other special needs, you should choose a plan based on your needs.

洪涛

1. You can write an http access function in the background. When someone uploads a picture to server 1, I use this module of http access to request server 2 to upload it. In fact, it is the process of simulating a human request
2. You can open a share on server 2, and after uploading successfully on server 1, copy it directly to server 2

PHPzhong

Can’t you just forward it directly

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template