You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PFFile fails to save from iOS SDK 1.12.0 on parse-server 2.1.3 #675
[Error]: Could not store file. (Code: 130, Version: 1.12.0)
The feature was working but stopped since I updated to the latest version. Unfortunately I don't have more information about the error yet cause parse-server isn't logging anything unusual. Below are dependencies I'm using:
I am also using the S3 adapter to upload files. In my main app.js file I have
varS3Adapter=require('parse-server').S3Adapter;vars3Adapter=newS3Adapter('XXXXX','XXXXXX',{bucket: "img-images",region: "xxxxxx"});varapi=newParseServer({databaseURI: 'mongodb://xxx:xxxx@localhost:27017/xxx',cloud: appRoot+'/parse_cloud/main.js',// Provide an absolute pathappId: 'xxx',masterKey: 'xxxxxx',filesAdapter: s3Adapter,serverURL: 'http://localhost:1337/parse',push: {ios: [{pfx: appRoot+'/apns_cert/apns-dev-key.p12',// Dev PFX or P12bundleId: 'com.xxx.xxxxx',production: false// Dev},{pfx: appRoot+'/apns_cert/apns-pro-key.p12',// Prod PFX or P12bundleId: 'com.xxx.xxxxxxx',production: true// Prod}]}});
Any ideas what could be wrong? Don't know if it could be related to issue #136. Thanks
Hey @vioside, looks like we don't fully expose the error on saving Files when using any provider - referenced in #661. I would recommend double checking your setup, but this said, I think if we do expose them - it would help you debug the issue.
Also would be a great help in debugging - simply logging the error in place which #661 highlights and putting it here.
Ok so I exposed the error as highlighted in #661 and I got more information. The error was Could not store file: InvalidParameterType: Expected params.Bucket to be a string (Code: 130, Version: 1.12.0)
Maybe the way we configure S3 has changed somewhere and now, instead of passing an object with bucket and region in the parameters, we just need to pass the bucket name like so:
var s3Adapter = new S3Adapter('XXXXX', 'XXXXXX', bucket: "[bucket name]");
Now the upload is working again! Thanks again for the pointers @nlutsenko I'm saved :)
Activity
nlutsenko commentedon Feb 26, 2016
Hey @vioside, looks like we don't fully expose the error on saving Files when using any provider - referenced in #661. I would recommend double checking your setup, but this said, I think if we do expose them - it would help you debug the issue.
Also would be a great help in debugging - simply logging the error in place which #661 highlights and putting it here.
chriscborg commentedon Feb 26, 2016
Ok so I exposed the error as highlighted in #661 and I got more information. The error was
Could not store file: InvalidParameterType: Expected params.Bucket to be a string (Code: 130, Version: 1.12.0)Maybe the way we configure S3 has changed somewhere and now, instead of passing an object with bucket and region in the parameters, we just need to pass the bucket name like so:
var s3Adapter = new S3Adapter('XXXXX', 'XXXXXX', bucket: "[bucket name]");Now the upload is working again! Thanks again for the pointers @nlutsenko I'm saved :)