1. First of all, when a project accesses a picture in another project, you only need to know the address, that is, url, to
2. There should be no permission to write pictures of one project to another project. You can put them in a public place
3. Nowadays, pictures are generally put on cloud storage such as Qiniuyun and Aliyun, but seldom on local management
1. After both projects are deployed, there will be a program listening port, so you can access the data in the project through http requests, so you only need to know the network address of the first project image to access the image in the first project.
2. You can upload pictures by http request.
https://www.jianshu.com/p/e6d.
mklink /j "C:\web1\upload" "C:\web2\upload"
< H1 > question < / H1 >
read your description and understand the following points about your problems or needs.
1, not the same physical machine deployment
.
2, not only access each other
, but also write
to each other.
< H1 > solution < / H1 >
1, distributed
file storage system.
upload 1.1 stores the files in the third
Http service, sharing reads and writes.
requirements 1.2 such as Ali Cloud OSS
.
2, share Token
sharing 2.1 allows users of Web service
to read and write files to each other, and use Token
because of security issues.
upload 2.2 when a user needs to upload a file, issues a Token
for user upload file authentication
.
authentication 2.3 Token: stateless authentication is a string of signatures after encryption
it is not necessary to record Session
on their respective servers.
3, develop a simple upload service separately
upload 3.1 if the above cannot be satisfied, you can develop a Web service
to ensure that you can read and write files.
authentication 3.2 can also use Token authentication
to solve the problem of sharing authentication between two services.