{"id":19856959,"url":"https://github.com/johnvuko/paperclip-storage-http","last_synced_at":"2025-02-28T21:45:17.841Z","repository":{"id":2101764,"uuid":"3042883","full_name":"johnvuko/paperclip-storage-http","owner":"johnvuko","description":"HTTP storage support for paperclip.","archived":false,"fork":false,"pushed_at":"2012-12-09T04:05:53.000Z","size":100,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T14:15:43.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/johnvuko.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":"2011-12-23T23:41:59.000Z","updated_at":"2014-10-30T09:51:10.000Z","dependencies_parsed_at":"2022-08-06T12:00:48.902Z","dependency_job_id":null,"html_url":"https://github.com/johnvuko/paperclip-storage-http","commit_stats":null,"previous_names":["johnvuko/paperclip-storage-http"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fpaperclip-storage-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fpaperclip-storage-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fpaperclip-storage-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fpaperclip-storage-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnvuko","download_url":"https://codeload.github.com/johnvuko/paperclip-storage-http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241246110,"owners_count":19933299,"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-12T14:17:04.347Z","updated_at":"2025-02-28T21:45:17.808Z","avatar_url":"https://github.com/johnvuko.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Paperclip storage HTTP\n======================\n\nHTTP storage support for paperclip.\n\nRequirements\n------------\n\nYou must have in your Gemfile:\n\n\tgem \"paperclip\", :git =\u003e \"git://github.com/thoughtbot/paperclip.git\"\n\n\nInstallation\n------------\n\nInclude the gem in your Gemfile:\n\n    gem 'paperclip-storage-http', :git =\u003e 'https://github.com/jonathantribouharet/paperclip-storage-http'\n\n\nUsage\n-----\n\nMinimal configuration in your model:\n\t\n\tclass User \u003c ActiveRecord::Base\n\t\n\t\thas_attached_file :avatar,\n\t\t\t:storage =\u003e :http,\n\t\t\t:http_url_upload =\u003e 'http://mycdn.com/upload',\n\t\t\t:http_url_remove =\u003e 'http://mycdn.com/remove',\n\t\t\t:url =\u003e \"http://mycdn.com/images/:attachment/:id/:style/:basename.:extension\"\t\n\t\t\t\n\tend\n\nCustom configuration in your model:\n\t\n\tclass User \u003c ActiveRecord::Base\n\t\n\t\thas_attached_file :avatar,\n\t\t\t:storage =\u003e :http,\n\t\t\t:http_url_upload =\u003e 'http://mycdn.com/upload',\n\t\t\t:http_url_remove =\u003e 'http://mycdn.com/remove',\n\t\t\t:http_params_upload =\u003e {'secret' =\u003e 'my_secret_key_for_upload'},\n\t\t\t:http_params_remove =\u003e {'secret' =\u003e 'my_secret_key_for_remove'},\n\t\t\t:http_param_file_upload =\u003e 'file',\n\t\t\t:http_param_path_upload =\u003e 'path',\n\t\t\t:http_param_path_remove =\u003e 'path',\n\t\t\t:path =\u003e \":attachment/:id/:style/:basename.:extension\",\n\t\t\t:url =\u003e \"http://mycdn.com/images/:attachment/:id/:style/:basename.:extension\"\t\n\t\t\t\n\tend\n\n* `http_url_upload` is the URL used for upload your file, it's mandatory.\n* `http_url_remove` is the URL used for remove your file, it's mandatory.\n* `path` is the path send to `http_url_upload` or `http_url_remove`, by default it's `:attachment/:id/:style/:basename.:extension`.\n* `url` is the URL used for access to your file, it's mandatory.\n* `http_params_upload` is a Hash of parameters that you can pass for the upload, it's optional.\n* `http_params_remove` is a Hash of parameters that you can pass for the removal, it's optional.\n* `http_param_file_upload` is name of file parameter for upload, by default it's `file`.\n* `http_param_path_upload` is name of path parameter for upload, by default it's `path`.\n* `http_param_path_remove` is name of path parameter for removal, by default it's `path`.\n\nRequests on `http_url_upload` and `http_url_remove` are always POST.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnvuko%2Fpaperclip-storage-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnvuko%2Fpaperclip-storage-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnvuko%2Fpaperclip-storage-http/lists"}