Unable to Upload image in parse dashboard,Logs says : Could not Store file Quota Exceeded

347 views Asked by At

I am Working on an Android App, for which I use Parse as a backend[Parse-Heroku-Mlab (sandbox Plan)], this app provides different Services in the city, & the service owners complete information is listed in the App which also has User Images and icons.

Issue : When i try to upload images it doesn't gets uploaded(until last day it was working fine), but the text fields in the dashboard works and gets uploaded.

Parse Logs says : 2017-05-28T04:30:17.793Z - Could not store file. 2017-05-28T04:30:17.790Z - quota exceeded

Screenshots of Mongodb stats is attached. enter image description here

Could it be that the issue is with Mlab.The sandbox plan gives the storage upto 512 mb. I tried freeing the space, but no go.

1

There are 1 answers

0
Arturo Jamaica On

Try using a CDNfor storage like GCSAdapter or de S3Adapter. It is plain simple to set up. Old Images will continue work as normal.

var GCSAdapter = require('parse-server-gcs-adapter');

var gcsAdapter = new GCSAdapter('project', 
                            'keyFilePath', 
                            'bucket' , {
                                bucketPrefix: '',
                                directAccess: false
                            });
var api = new ParseServer({
    appId: 'my_app',
    masterKey: 'master_key',
    filesAdapter: gcsAdapter
})

Mlab calculates your quota by the fileSize value output from MongoDB. The size of an image can be from 3 to 12mb in modern phones.