Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Small cleanup

  • Loading branch information...
commit f8ffbdd6fa0910befad836e9705b32b0aee24d63 1 parent bf28e32
Jeremy Herrman authored
View
6 scanbooth_web/app/jobs/sketchfab_upload.rb
@@ -7,6 +7,7 @@
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)
@@ -14,14 +15,15 @@ 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
Please sign in to comment.
Something went wrong with that request. Please try again.