Matthew Turk committed 0646def

A few minor fixes.

  • Participants
  • Parent commits 99b5ebd

Comments (0)

Files changed (4)

File ythub/templates/mapserver.html

-  <DIV id="map" style="height: 511px; width: 511px;"></div>
+  <DIV id="map"></div>

File ythub/templates/vertices.html

     // .. make it transparent
+    examine = {gal: galaxy00, r: r};
     // add the object

File ythub/

 from tempfile import TemporaryFile
 from flask import jsonify
-#from ythub.models import model_registry
+from ythub.models import view_proxies
 from ythub.database import db_session, sdb, bucket
 from yt.mods import *
 import uuid
 class UploadHandler(object):
     def __init__(self, chunk_data, metadata):
+        if metadata['obj_type'] not in view_proxies:
+            raise KeyError
         self.metadata = metadata
         self.chunk_data = chunk_data
         # Metadata has to tell me a bit about the chunks

File ythub/

     metadata = json.loads(request.form['metadata'])
     print "UPLOAD STARTED FOR", user_id
     metadata['user_id'] = user_id
-    container['uploader_%s' % uu] = UploadHandler(chunk_data, metadata)
+    try:
+        container['uploader_%s' % uu] = UploadHandler(chunk_data, metadata)
+    except KeyError:
+        return make_response("Unknown datatype %s" % (metadata['obj_type']))
     return jsonify(handler_uuid = uu, chunk_size = CHUNK_SIZE)
 @app.route("/upload/handler/<handler_uuid>", methods=["POST", "GET"])