我正在使用laravel-elfinder 2和tinyMce 4测试文件上传。当我上传图像时,图像以绝对路径保存,例如let reachability = Reachability()!
func setUpReachability()
{
//declare this property where it won't go out of scope relative to your listener
DispatchQueue.main.async {
self.reachability.whenReachable = { reachability in
if reachability.connection == .wifi {
print("Reachable via WiFi")
} else {
print("Reachable via Cellular")
}
}
self.self.reachability.whenUnreachable = { _ in
print("Not reachable")
}
do {
try self.reachability.startNotifier()
} catch {
print("Unable to start notifier")
}
}
}
。并且当我更改服务器主机(例如"http://localhost:8000/images/file.jpg"
)时,无法加载保存的图像。当我检查图像的链接时,它们从"192.168.1.23 or something other"
加载并失败。因此,我想保存上传的图片,例如localhost:8000
。我该如何操作该Elfinder?如果没有,我以后会遇到一些问题。