{"id":21657004,"url":"https://github.com/cotag/condo_example","last_synced_at":"2025-04-11T22:12:57.065Z","repository":{"id":4791302,"uuid":"5943906","full_name":"cotag/condo_example","owner":"cotag","description":"An example Condo app","archived":false,"fork":false,"pushed_at":"2016-03-02T12:53:38.000Z","size":227,"stargazers_count":14,"open_issues_count":6,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-11T22:12:51.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/cotag.png","metadata":{"files":{"readme":"README.textile","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":"2012-09-25T02:18:14.000Z","updated_at":"2016-02-24T06:10:36.000Z","dependencies_parsed_at":"2022-09-14T00:10:33.861Z","dependency_job_id":null,"html_url":"https://github.com/cotag/condo_example","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/cotag%2Fcondo_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotag%2Fcondo_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotag%2Fcondo_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotag%2Fcondo_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cotag","download_url":"https://codeload.github.com/cotag/condo_example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487684,"owners_count":21112190,"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-25T09:18:43.654Z","updated_at":"2025-04-11T22:12:57.032Z","avatar_url":"https://github.com/cotag.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"h1. Condo Example App\n\nA basic implementation of \"Condo\":https://github.com/cotag/Condominios to demonstrate uploading files directly from the browser to \"Amazon S3\":http://aws.amazon.com/s3/ or \"Google Cloud Storage\":https://cloud.google.com/products/cloud-storage\n* Supports drag and drop (with folders)\n* Multiple uploads (can easily handle 1000's of files)\n* Pause / Resume functionality (Resumable and chunked uploads are available on Amazon for files over 5MB.)\n\n\n!https://raw.github.com/cotag/condo_example/master/doc/upload_screenshot.png!\n\n\n\nh2. Usage\n\n# Clone repository onto your system\n# Edit @config/initializers/condo_providers.rb@\n# Edit @app/controllers/uploads_controller.rb@\n#* @set_callback :bucket_name@ should be set to an existing bucket\n#* configuring your provider (see below)\n# Set the required environmental variables with your providers security keys\n#* As defined in condo_providers.rb\n# @bundle install@\n# @rake db:migrate@\n# @rails server@\n# Browse to: http://localhost:3000/\n\n\nh3. Configuring your provider\n\nh4. Amazon\n\n# \"Enable CORS\":http://aws.typepad.com/aws/2012/08/amazon-s3-cross-origin-resource-sharing.html at the bucket level\n\n\u003cpre\u003e\u003ccode class=\"xml\"\u003e\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cCORSConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\"\u003e\n    \u003cCORSRule\u003e\n        \u003cAllowedOrigin\u003ehttp://localhost:3000\u003c/AllowedOrigin\u003e\n        \u003cAllowedMethod\u003ePUT\u003c/AllowedMethod\u003e\n        \u003cAllowedMethod\u003ePOST\u003c/AllowedMethod\u003e\n        \u003cAllowedHeader\u003e*\u003c/AllowedHeader\u003e\n    \u003c/CORSRule\u003e\n    \u003cCORSRule\u003e\n        \u003cAllowedOrigin\u003e*\u003c/AllowedOrigin\u003e\n        \u003cAllowedMethod\u003eGET\u003c/AllowedMethod\u003e\n    \u003c/CORSRule\u003e\n\u003c/CORSConfiguration\u003e\n\n\u003c/code\u003e\u003c/pre\u003e\n\nYou may want to apply similar configurations programmatically in production, especially if you have a bucket per-user.\n\n\nh4. Google\n\n# Enable 'Interoperable Storage Access' on your application\n# Enable CORS at the bucket level - \"Googles documentation\":https://developers.google.com/storage/docs/cross-origin\n\n\u003cpre\u003e\u003ccode class=\"xml\"\u003e\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cCorsConfig\u003e\n  \u003cCors\u003e\n    \u003cOrigins\u003e\n      \u003cOrigin\u003ehttp://localhost:3000\u003c/Origin\u003e\n    \u003c/Origins\u003e\n    \u003cMethods\u003e\n      \u003cMethod\u003eGET\u003c/Method\u003e\n      \u003cMethod\u003eHEAD\u003c/Method\u003e\n      \u003cMethod\u003ePOST\u003c/Method\u003e\n      \u003cMethod\u003ePUT\u003c/Method\u003e\n    \u003c/Methods\u003e\n    \u003cResponseHeaders\u003e\n      \u003cResponseHeader\u003eorigin\u003c/ResponseHeader\u003e\n      \u003cResponseHeader\u003econtent-md5\u003c/ResponseHeader\u003e\n      \u003cResponseHeader\u003eauthorization\u003c/ResponseHeader\u003e\n      \u003cResponseHeader\u003ex-goog-date\u003c/ResponseHeader\u003e\n      \u003cResponseHeader\u003ex-goog-acl\u003c/ResponseHeader\u003e\n      \u003cResponseHeader\u003econtent-type\u003c/ResponseHeader\u003e\n      \u003cResponseHeader\u003eaccept\u003c/ResponseHeader\u003e\n      \u003cResponseHeader\u003ex-goog-api-version\u003c/ResponseHeader\u003e\n      \u003cResponseHeader\u003ex-goog-resumable\u003c/ResponseHeader\u003e\n      \u003cResponseHeader\u003eETag\u003c/ResponseHeader\u003e\n    \u003c/ResponseHeaders\u003e\n    \u003cMaxAgeSec\u003e1800\u003c/MaxAgeSec\u003e\n  \u003c/Cors\u003e\n\u003c/CorsConfig\u003e\n\n\u003c/code\u003e\u003c/pre\u003e\n\nI wrote a helper function in Condo for applying this using \"Fog\":http://fog.io/\n\n\nh4. Rackspace\n\nIf you do want to use it you'll have to enable \"temporary URLs\":http://docs.rackspace.com/files/api/v1/cf-devguide/content/Create_TempURL-d1a444.html you need to set a \"metadata header\":http://docs.rackspace.com/files/api/v1/cf-devguide/content/Set_Account_Metadata-d1a4460.html on your account.\nThere is also a helper function in Condo that achieves this using Fog.\nYou'll also need to enable CORS: http://docs.rackspace.com/files/api/v1/cf-devguide/content/CORS_Container_Header-d1e1300.html\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotag%2Fcondo_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcotag%2Fcondo_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotag%2Fcondo_example/lists"}