解析服务器 - 找不到文件 [英] Parse server - File not found
问题描述
解析服务器版本:2.8.4
Parse server version: 2.8.4
解析仪表板版本:1.2.0
Parse dashboard version: 1.2.0
MongoDB 版本:4.0.2
MongoDB version: 4.0.2
托管服务:DigitalOcean
Hosting service: DigitalOcean
==================================
=================================
我正在将我的应用转移到新的 Parse 服务器和新的 MongoDB 服务器.一切正常,除了我无法加载任何图像!正在正确获取内容,但无法加载图像.既不是来自应用程序,也不是来自仪表板.(我在那里找到 File not found.
)
I'm transferring my app to a new Parse server and a new MongoDB server.
Everything works fine except the fact that I can't load any images! The content is being fetched properly, but the images don't load. Neither from the app, nor from the dashboard. (I get the File not found.
there)
这是我转移数据库的方式:mongodump --host sourceIP -d dbName --port 27017
Here's how I transferred my db:
mongodump --host sourceIP -d dbName --port 27017
然后加载它:mongorestore --db dbName dbDir --username username" --password password" --authenticationDatabase admin"
我做了一个 db.fs.files.find()
并且图像似乎在那里就好了!
I did a db.fs.files.find()
and the images seem to be there just fine!
我也尝试上传新的图像文件,但出现错误:错误 130.无法存储文件.
I also tried uploading a new image file and got the error:
error 130. Could not store file.
我相信这是一个数据库端的问题,因为我用另一个 MongoDB 测试了解析服务器并且它正在工作!
I believe that this is a db-side issue, because I tested the parse server with another MongoDB I have and it was working!
我也尝试创建一个新的 Droplet 并重做所有内容,但没有解决!
I also tried creating a new droplet and redo everything, but it didn't fix it!
有什么建议吗?
推荐答案
我度过了我生命中的 2.5 天,充满压力,只因为我的 auth 密码中有符号 &
,里面我的databaseURI
!出于某种原因,它不会影响获取数据,但会影响获取图像!
I spent 2.5 days of my life, full of stress, just because I had the symbol &
in my auth password, inside my databaseURI
! For some reason, it doesn't affect fetching the data but it does affect fetching images!
这篇关于解析服务器 - 找不到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!