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

Files on S3 Won't Display Properly #3306

Closed
spiderguy84 opened this issue Jan 2, 2017 · 7 comments
Closed

Files on S3 Won't Display Properly #3306

spiderguy84 opened this issue Jan 2, 2017 · 7 comments

Comments

@spiderguy84
Copy link

[DELETE EVERYTHING ABOVE THIS LINE BEFORE SUBMITTING YOUR ISSUE]

I have migrated my app to mongo and heroku. I am now working on making sure all the PFFiles, which are all images, get migrated to my S3. I ran through the tutorial and code, and verified my pictures DO appear in S3 bucket, and that mongoDb updated the names of them. However, when I run the app and try to view a picture I get this:

[Error]: Response status code was unacceptable: 403 (Code: 1, Version: 1.14.2)

Here is my index.js

`// Example express application adding the parse-server module to expose Parse
// compatible API routes.

var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var path = require('path');

var databaseUri = process.env.DATABASE_URI || process.env.MONGODB_URI;
var S3Adapter = require('parse-server').S3Adapter;
if (!databaseUri) {
console.log('DATABASE_URI not specified, falling back to localhost.');
}

var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://MYSTUFF/app',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || 'APPID',
masterKey: process.env.MASTER_KEY || 'MASTER',
serverURL: process.env.SERVER_URL || 'https://fritchchurch.herokuapp.com/parse', // Don't forget to change to https if needed

filesAdapter: new S3Adapter(
process.env.AWS_ACCESS_KEY_ID || "KEYID",
process.env.AWS_SECRET_ACCESS_KEY || "ACCESSKEY",
process.env.BUCKET_NAME || "fritchdirectory",
{directAccess: true}

),

liveQuery: {
classNames: ["Users", "FritchDirectory"] // List of classes to support for query subscriptions
}

});

`

[FILL THIS OUT]

Steps to reproduce

Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.

  1. [FILL THIS OUT]
  2. [FILL THIS OUT]
  3. [FILL THIS OUT]

Expected Results

[FILL THIS OUT]

Actual Outcome

[FILL THIS OUT]

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: [FILL THIS OUT]
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]

Logs/Trace

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

[FILL THIS OUT]

@HackShitUp
Copy link

Any update on this? I need to figure out how to save video files to AWS Elastic Beanstalk hosting MongoDB ASAP

@grantespo
Copy link

When I deployed to heroku. My project didn't contain an index.js file. How do you get the index.js file in your project?

@HackShitUp
Copy link

@grantespo I think it comes with the Parse SDK. Are you using Cocoapods?

@grantespo
Copy link

I don't know what Cocoapods is. But since I pushed the "deploy to Heroku Button" @ https://github.com/ParsePlatform/parse-server-example. My project doesn't contain any .js file files in it? How Do I implement these into my project?

@jeacott1
Copy link

jeacott1 commented Jan 5, 2017

there was a fix for this (I think) but it was reverted, not sure why. #2705

@natanrolnik
Copy link
Contributor

@spiderguy84 did you manage to solve your issue?

@stale
Copy link

stale bot commented Sep 18, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

5 participants