Skip to content
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

Uploads to wrong path to AWS S3 #3448

Closed
ghost opened this issue Jan 29, 2017 · 0 comments
Closed

Uploads to wrong path to AWS S3 #3448

ghost opened this issue Jan 29, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 29, 2017

Migration went fine and all my images are located in bucket: e.g.: https://dishoftheday.s3.amazonaws.com/mfp_3dec89eThumb_btbUfnkKQS.jpg

But when I am trying to upload via javascript SDK it tries to upload to the following location: http://ec2-52-90-46-148.compute-1.amazonaws.com/parse/files/xxx.jpg

What am I missing?

My server.js:

`var s3Options = {
"bucket": "dishoftheday",
"accessKey": "xxx",
"secretKey": "'xxx",
"region": 'us-east-1',
"bucketPrefix": '',
"directAccess": true,
"baseUrl": null,
"signatureVersion": 'v4',
"globalCacheControl": 'public, max-age=86400'
}

var s3Adapter = new S3Adapter(s3Options);

var api = new ParseServer({
databaseURI: "mongodb://dishoftheday:....",
cloud: "./cloud/main.js",
appId: "xxx",
masterKey: "xxx",
fileKey: "xxx",
clientKey: "xxx",
javascriptKey: "xxx",
serverURL: 'http://ec2-52-90-46-148.compute-1.amazonaws.com/parse/',
filesAdapter: s3Adapter,
push: {
ios: [{
pfx: './certs/pushDev.p12', // the path and filename to the .p12 file you exported earlier.
bundleId: 'dk.dida.dishoftheday', // The bundle identifier associated with your app
production: false // Specifies which environment to connect to: Production (if true) or Sandbox
}, {
pfx: './certs/pushProd.p12',
bundleId: 'dk.dida.dishoftheday',
production: true
}]
}
});

var s3Options = {
"bucket": "dishoftheday",
"accessKey": "xxx",
"secretKey": "'xxx",
"region": 'us-east-1',
"bucketPrefix": '',
"directAccess": true,
"baseUrl": null,
"signatureVersion": 'v4',
"globalCacheControl": 'public, max-age=86400'
}

var s3Adapter = new S3Adapter(s3Options);

var api = new ParseServer({
databaseURI: "mongodb://dishoftheday:....",
cloud: "./cloud/main.js",
appId: "xxx",
masterKey: "xxx",
fileKey: "xxx",
clientKey: "xxx",
javascriptKey: "xxx",
serverURL: 'http://ec2-52-90-46-148.compute-1.amazonaws.com/parse/',
filesAdapter: s3Adapter,
push: {
ios: [{
pfx: './certs/dev.p12', // the path and filename to the .p12 file you exported earlier.
bundleId: 'dk.dida.dishoftheday', // The bundle identifier associated with your app
production: false // Specifies which environment to connect to: Production (if true) or Sandbox
}, {
pfx: './certs/push.p12',
bundleId: 'dk.dida.dishoftheday',
production: true
}]
}
});`

Issue Description

Describe your issue in as much detail as possible.

[FILL THIS OUT]

Steps to reproduce

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : [FILL THIS OUT]
    • Operating System: [FILL THIS OUT]
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): [FILL THIS OUT]
  • Database

    • MongoDB version: [FILL THIS OUT]
    • Storage engine: AWS S3
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? AWS

Logs/Trace

You can turn on additional logging by configuring VERBOSE=1 in your environment.

[FILL THIS OUT]

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants