If the upload directory is on the same server as the page, just pass the relative address, and the browser will parse it by itself. For example, your upload directory is webroot/upload ,那么回传时以 webroot 目录为 / 向后拼接,如 /upload/test.jpg.
If it is not the same server, add the domain name of the upload server at the beginning. You can omit the url protocol, and the browser will judge it by itself. Such as //static.site.com/upload/test.jpg
If the upload directory is on the same server as the page, just pass the relative address, and the browser will parse it by itself. For example, your upload directory is
webroot/upload
,那么回传时以 webroot 目录为/
向后拼接,如/upload/test.jpg
.If it is not the same server, add the domain name of the upload server at the beginning. You can omit the url protocol, and the browser will judge it by itself. Such as
//static.site.com/upload/test.jpg