{"id":20119607,"url":"https://github.com/box/uploaders","last_synced_at":"2025-03-02T20:14:54.794Z","repository":{"id":7577087,"uuid":"8931919","full_name":"box/uploaders","owner":"box","description":"Write your own custom uploader to send 3D models/textures to Verold Studio.","archived":false,"fork":false,"pushed_at":"2013-04-15T15:26:46.000Z","size":110,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-13T07:11:47.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/box.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-21T15:29:57.000Z","updated_at":"2023-09-08T16:38:21.000Z","dependencies_parsed_at":"2022-09-15T19:12:47.028Z","dependency_job_id":null,"html_url":"https://github.com/box/uploaders","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fuploaders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fuploaders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fuploaders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fuploaders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/box","download_url":"https://codeload.github.com/box/uploaders/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241564556,"owners_count":19982960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T19:16:17.625Z","updated_at":"2025-03-02T20:14:54.774Z","avatar_url":"https://github.com/box.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Verold Studio Uploader API\n\nThe Uploader API allows for developers to create integrations between modelling tools, ​3D scanning software, or other sources of 3D content. You can easily upload models and textures to Verold Studio through the API.\n\n## POST projects.json:\n\nThe method POST on http://studio.verold.com/projects.json allows you to create a new project ​with one or more assets (models, textures, materials, etc.). An example of using the API is given here, with detailed descriptions of the parameters below.\n\n    # easy_install poster\n    from poster.encode import multipart_encode\n    from poster.streaminghttp import register_openers\n    import urllib2\n \n    # Register the streaming http handlers with urllib2\n    register_openers()\n \n    import json\n    import base64\n    import urllib2\n \n    url=\"http://studio.verold.com/projects.json\"\n \n    data = {\n      'api_key': \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      'title': \"My First Project\",\n      'description': \"Hello World!  This is my first project!\",\n      'model': open(\"./model.zip\"),\n      'tags': \"test,first\",\n      'private': \"public\"\n    }\n \n    datamulti, headers = multipart_encode(data)\n \n    request = urllib2.Request(url, datamulti, headers)\n    print urllib2.urlopen(request).read()\n    \n    \n### api_key\nThe user’s API key, used for authentication. You can get your personal API key from here.\n\n### model\nThe model file. For best results, we recommend uploading a ZIP file containing the model (in OBJ, Collada, or FBX format) and all textures.\n\n### title (optional)\nThe project title.\n\n### description (optional)\nThe project description.\n\n### tags (optional)\nA comma-separated list of project tags.\n\n### private (optional)\nSet to “public” or “private” (Pro accounts only).  If private is set to “private” for a non-Pro account, the value is silently changed to “public” without generating an error. Defaults to private for Pro accounts.\n\n### scale_to_size (optional)\nScales the model(s) to fit in a cube of this size, placed on the ground plane. Default: don’t scale model(s).\n\n### merge_models (optional)\nIf “1”, treat multiple models as a single model.  When uploading multiple models in a ZIP archive, it is often best to set merge_models to “1” so that the relative sizing of each model is preserved; otherwise, models are scaled independently according to scale_to_size. Default: Don’t merge models.    \n\n## Response\n\nIf the project is created successfully, the response code is 201 and the response takes the form:\n\n    { \"id\":\"511399f3fc77b30200000469\", … }\n\nThe project can be viewed at:\n\n\u003e http://studio.verold.com/projects/511399f3fc77b30200000469\n\nIf an error occurs, check the response code.  For example, an invalid API key results in a 401 (unauthorized) response.\n\n# Determining Processing Success/Failure\n\nWhen a model is uploaded to Verold Studio, it is passed off asynchrnously to a cluster of processing servers where the models are optimized, compressed, and added to your project scene. This means, that if you redirect the user directly to Verold Studio immediately after the model files have been uploaded, that the user will likely get there before the modelrs are ready in the scene. Verold Studio will detect that there are jobs processing, and inform the user that a model is on the way. When it's ready, it will be automatically loaded into the scene.\n\nWe deliberately do not hold the request open while the uploaded models are processing. However, if you would like to hold the user in your tools until the models have been fully processed, you can easily achieve this by polling on the jobs queue of the project. Then you can only redirect the user to Verold Studio after the model has been fully processed. For this, use the Jobs API:\n\n    GET /projects/{project_id}/jobs.json\n\nan example url is:\n\n    http://studio.verold.com/projects/51504881c1f95e02000002da/jobs.json\n\nThe JSON output from that link is:\n\n    [\n      {\n        id: \"51504899c1f95e02000002e2\",\n        userId: \"xxxxxxxxxxxxxxxxxxxxxxx\",\n        projectId: \"123123123123123123123\",\n        filePath: \"uploads/asahashashgashahg/hashjahjashsahjashjashjashjahjashjsa/fighter.fbx\",\n        state: \"COMPLETE\",\n        autoInstance: false,\n        dateCreated: \"2013-03-25T12:52:41.682Z\",\n        dateModified: \"2013-03-25T12:49:36.931Z\"\n      },\n      ...\n    ]\n\n\nThere will be one entry for each uploaded file, and the state of each entry will be one of:\n\n    'CREATED', 'STARTED', 'COMPLETE', 'ERROR'\n\nIn normal circumstances the job should go to either complete or error fairly quickly, depending on the complexity of the model.\n\n# Optimization\n\nThe Verold Uploader supports decimation and optimization during the upload process. This is especially useful for high-res 3D scans; using the optimization parameters you can very easily generate a version of your model that can be displayed in realtime. Be aware that using these optimization parameters will slow the upload process. \n\nFor an example of how to use the optimization parameters, see the Python upload script:\n\n    Python/VeroldUploader.py\n    \nYou can run this as follows:\n\n    python VeroldUploader.py -k api_key -d 0.1 -t 50000 file.obj\n    \nThe first step of optimization is to decimate the model. You can speficy either -d for the decimation percentage, or -t for the maximum number of polygons. Models less than 20K polys load extremely fast, then up to 200K polys load pretty well. Beyond 200K polys, model loading gets slower, sometimes unbearably slow on lower powered client machines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fuploaders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbox%2Fuploaders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fuploaders/lists"}