[英]PFFile Could not store file to Parse-server
Parse Dashboard version 1.1.2 解析仪表板版本1.1.2
Parse Server version 2.7.1 解析服务器版本2.7.1
Environment Setup 环境设定
Parse-Dashboard running on Ubuntu 16.4 (Digital ocean Droplet) 在Ubuntu 16.4上运行的Parse-Dashboard(数字海洋Droplet)
Steps to reproduce 重现步骤
Logs/Trace 日志/追踪
browser console: [Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (profile.jpg, line 0) ---- http://myserver:1337/parse/files/profile.jpg 浏览器控制台:[错误]无法加载资源:服务器响应状态为400(错误请求)(profile.jpg,第0行)---- http:// myserver:1337 / parse / files / profile.jpg
Parse-dashboard log: Could not store file 解析仪表盘日志:无法存储文件
Xcode output: [Error]: Could not store file. Xcode输出:[错误]:无法存储文件。 (Code: 130, Version: 1.16.0)
(代码:130,版本:1.16.0)
Parse-server configuration-example: 解析服务器配置示例:
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);
如果您尝试从仪表板上传图像,则需要在仪表板配置(parse-dashboard-config.json)中添加javascript键。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.