-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
S3Adapter returning incorrect url #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
(-‸ლ) Nice catch, fixing in a moment. |
not sure if it is related to this issue, but from my iOS and Android apps and since version 2.1.4, I am getting a URL for my S3 Parse Files that are pointing to my server instead of to S3. Had to revert back to 2.1.3 for the URL to show correctly. |
Did you use directAccess = true? |
Hi @flovilmart thanks for the reply - no I hadn't. seems like it was a new configuration that I missed. but I added the new config and went back to parse 2.1.4 and still no luck so far; still getting the url to my server |
How do you launch parse-server? |
I have parse-server as part of another project so I had it installed through npm, added var S3Adapter = require('parse-server').S3Adapter;
var s3Adapter = new S3Adapter('xxx', 'xxx', "xx", {directAccess: true});
// Specify the connection string for your mongodb database
// and the location to your Parse cloud code
var api = new ParseServer({
databaseURI: 'xxx',
cloud: appRoot + '/parse_cloud/main.js', // Provide an absolute path
appId: 'xxx',
masterKey: 'xxx',
clientKey: 'xxx',
filesAdapter: s3Adapter,
serverURL: 'http://localhost:1337/parse',
push: {
android: {
senderId: 'xxx',
apiKey: 'xxx'
},
ios: [
{
pfx: appRoot + '/apns_cert/apns-dev-key.p12', // Dev PFX or P12
bundleId: 'xxx',
production: false // Dev
},
{
pfx: appRoot + '/apns_cert/apns-pro-key.p12', // Prod PFX or P12
bundleId: 'xxx',
production: true // Prod
}
]
}
});
app.use('/parse', api); to my app.js and then run with |
We had a problem with the AdapterLoader in 2.1.4, 2.1.5 will be out soon and should resolve that issue |
I was getting incorrect urls for my files stored in S3. I'm using parse-server 2.0.8
I had to modify the following line in S3Adapter.js
From: return 'https://' + this.bucket + '._s3Client.amazonaws.com' + '/' + this._bucketPrefix + filename;
To: return 'https://' + this._bucket + '.s3.amazonaws.com' + '/' + this._bucketPrefix + filename;
The text was updated successfully, but these errors were encountered: