Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moving sketchfab and ftp config into development.rb

  • Loading branch information...
commit 37619063299cbf2df428d4445e6d786e7edff472 1 parent 97124a6
@jherrm authored
View
6 scanbooth_web/app/jobs/ftp_upload.rb
@@ -2,9 +2,9 @@
module FtpUpload
@queue = :upload
- FTP_SERVER = ""
- FTP_USERNAME = ""
- FTP_PASSWORD = ""
+ FTP_SERVER = ScanBooth::Application.config.ftp[:server]
+ FTP_USERNAME = ScanBooth::Application.config.ftp[:username]
+ FTP_PASSWORD = ScanBooth::Application.config.ftp[:password]
def self.perform(user_id)
View
7 scanbooth_web/app/jobs/sketchfab_upload.rb
@@ -6,8 +6,8 @@
module SketchfabUpload
@queue = :upload
- API_KEY = ""
# Get your API key from your sketchfab account dashboard.
+ API_KEY = ScanBooth::Application.config.sketchfab[:api_key]
URL = "https://api.sketchfab.com/model"
def self.perform(user_id)
@@ -17,9 +17,8 @@ def self.perform(user_id)
path = [ScanBooth::Application.config.scans_path, filename].join('/')
# thumbnail_filepath = [ScanBooth::Application.config.scans_path, filename<<".png"].join('/')
title = user.name || filename
- desc = ""
- tags = ""
-
+ desc = ScanBooth::Application.config.sketchfab[:description]
+ tags = ScanBooth::Application.config.sketchfab[:tags]
contents = Base64.encode64(File.read(path))
# thumbnail = Base64.encode64(File.read(thumbnail_filepath))
View
10 scanbooth_web/config/environments/development.rb
@@ -61,9 +61,19 @@
config.scan_viewer_enabled = false
config.scan_view_url = "https://sketchfab.com/show/"
+ config.sketchfab = {
+ api_key: "",
+ description: "",
+ tags: ""
+ }
config.scan_download_enabled = false
config.scan_download_url = ""
+ config.ftp = {
+ server: "",
+ username: "",
+ password: ""
+ }
config.contact_info = {
name: '',
Please sign in to comment.
Something went wrong with that request. Please try again.