Permalink
Browse files

Small cleanup

  • Loading branch information...
1 parent bf28e32 commit f8ffbdd6fa0910befad836e9705b32b0aee24d63 Jeremy Herrman committed Sep 23, 2012
Showing with 5 additions and 3 deletions.
  1. +4 −2 scanbooth_web/app/jobs/sketchfab_upload.rb
  2. +1 −1 scanbooth_web/config/environments/development.rb
View
6 scanbooth_web/app/jobs/sketchfab_upload.rb
@@ -7,21 +7,23 @@
module SketchfabUpload
@queue = :upload
API_KEY = ""
+ # Get your API key from your sketchfab account dashboard.
URL = "https://api.sketchfab.com/model"
def self.perform(user_id)
user = User.find(user_id)
filename = user.scan_file_with_ext
path = [ScanBooth::Application.config.scans_path, filename].join('/')
+ # thumbnail_filepath = [ScanBooth::Application.config.scans_path, filename<<".png"].join('/')
title = user.name || filename
desc = ""
tags = ""
- # thumbnail_filename="/data/thumbnail.png"
+
contents = Base64.encode64(File.read(path))
+ # thumbnail = Base64.encode64(File.read(thumbnail_filepath))
- # thumbnail = Base64.encode64(File.read(thumbnail_filename))
data = {
title: title,
description: desc,
View
2 scanbooth_web/config/environments/development.rb
@@ -55,8 +55,8 @@
thanks_message: "We hope you had a great time getting scanned!"
}
- # Absolute path to location of the scans to upload to external sites
config.scans_path = "/scans"
+ # Absolute path to the scans to upload for external sites and printing
config.scan_extension = "stl"
config.scan_viewer_enabled = false

0 comments on commit f8ffbdd

Please sign in to comment.