0

Parse Dashboard version 1.1.2

Parse Server version 2.7.1

Environment Setup

Parse-Dashboard running on Ubuntu 16.4 (Digital ocean Droplet)

Steps to reproduce

  • Adding a new column type of File
  • uploading an image existing object though both client and parse dashboard
  • After loading the imagine nothing shows up

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

Parse-dashboard log: Could not store file

Xcode output: [Error]: Could not store file. (Code: 130, Version: 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);
Mohammed
  • 33
  • 1
  • 6

1 Answers1

0

You need to add javascript key in your dashboard config (parse-dashboard-config.json) if you are trying to upload images from dashboard.

flame3
  • 2,812
  • 1
  • 24
  • 32