Skip to content

Uploads to wrong path to AWS S3 #3448

Closed

Description

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]

Activity

  1. ghost closed this as completedon Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions