解析仪表板版本 1.1.2
解析服务器版本 2.7.1
环境设置
在 Ubuntu 16.4 上运行的 Parse-Dashboard(数字海洋水滴)
重现步骤
- 添加新的列类型文件
- 通过客户端和解析仪表板上传图像现有对象
- 加载想象后什么都没有出现
日志/跟踪
浏览器控制台:[错误] 加载资源失败:服务器响应状态为 400(错误请求)(profile.jpg,第 0 行)---- http://myserver:1337/parse/files/profile.jpg
解析仪表板日志:无法存储文件
Xcode 输出:[错误]:无法存储文件。(代码:130,版本:1.16.0)
解析服务器配置示例:
var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var path = require('path');
var databaseUri = process.env.DATABASE_URI || process.env.MONGODB_URI;
if (!databaseUri) {
console.log('DATABASE_URI not specified, falling back to localhost.');
}
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
cloud:'./cloud/main.js',// process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || '',
verbose: true,
masterKey: process.env.MASTER_KEY || '',
javascriptKey: process.env.JAVASCRIPT_KEY || '',
allowClientClassCreation: process.env.CLIENT_CLASS_CREATION || false,
serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse',
publicServerURL:'http://example.com:1337/parse',
push: {
},
liveQuery: {
classNames: ["", ""]
},
push: {
ios: {
pfx: 'Push.p12',
passphrase: '',
bundleId: '',
production: false
}
}
});
var app = express();
app.use('/public', express.static(path.join(__dirname, '/public')));
var mountPath = process.env.PARSE_MOUNT || '/parse';
app.use(mountPath, api);
app.get('/', function(req, res) {
res.status(200).send('I dream of being a website. Please star the parse-server repo on GitHub!');
});
var port = process.env.PORT || 1337;
var httpServer = require('http').createServer(app);
httpServer.listen(port, function() {
console.log('parse-server-example running on port ' + port + '.');
});
ParseServer.createLiveQueryServer(httpServer);