aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/models
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #31927 from mrreynolds/patch-2Eileen M. Uchitelle2018-02-091-0/+8
|\ | | | | Document :combine_options
| * Document :combine_optionsRobert Glaser2018-02-081-0/+8
| | | | | | | | Turns out this is still undocumented functionality.
* | Fix `blob.service_url` for supports string or nil `:filename` option.Jason Lee2018-02-082-1/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | - Make sure `blob.service_url` present a `ActiveStorage::Filename` type to `serivce.url`. - Add `ActiveStorage::Filename.wrap` method. before: ```rb blob.service_url(filename: ActiveStorage::Filename.new("new.txt")) blob.service_url(filename: "new.txt") => NoMethodError: undefined method `parameters' for "new.txt":String params = {} blob.service_url(filename: params[:filename]) => NoMethodError: undefined method `parameters' for nil:NilClass ``` after: ```rb blob.service_url(filename: "new.txt") blob.service_url(filename: nil) ```
* Merge pull request #31854 from huacnlee/allow-more-options-for-service-urlGeorge Claghorn2018-02-011-2/+3
|\ | | | | Allow ActiveStorage::Blob#service_url to pass addition options to service.url
| * Allow `ActiveStorage::Blob#service_url` to pass addition options to ↵Jason Lee2018-02-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `service.url`. Because there have some service needs more parameters for file URL: https://www.alibabacloud.com/help/doc-detail/44687.htm ```rb class AliyunService < Service def url(key, options = {}) image_process = options[:oss_process] || "image/resize,w_800" "http://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=#{image_process}" end end ``` Use case: ```erb <%= image_tag @user.avatar.service_url(oss_process: "image/resize,m_fill,h_100,w_100" %> ```
* | Use the full class name for the JSON coder, as there may be anotherRenaud Chaput2018-02-011-1/+1
|/ | | | | | `JSON` constant defined. For example when using the `representable` gem: https://github.com/trailblazer/representable/issues/224
* Extract content types from blob dataGeorge Claghorn2018-01-154-5/+64
|
* Instrument image transformationGeorge Claghorn2018-01-101-7/+9
|
* Update error names in docs [ci skip]George Claghorn2018-01-101-3/+3
|
* Add missing `# frozen_string_literal: true`Ryuta Kamizono2018-01-112-0/+4
|
* Correct comment [ci skip]George Claghorn2018-01-101-1/+1
|
* Extract Analyzable and Representable concernsGeorge Claghorn2018-01-103-147/+148
|
* Allow overriding filename in `Blob#service_url`Rosa Gutierrez2018-01-081-1/+1
| | | | | | | This is useful when we have several representations for the same underlying file, each one with a different name, and we need to provide a custom download URL based on that name and not that of the underlying file.
* Force content disposition to attachment for specific content typesRosa Gutierrez2018-01-051-2/+7
| | | | | | | | | | | | | | In this way we avoid HTML, XML, SVG and other files that can be rendered by the browser to be served inline by default. Depending on the origin from where these files are served, this might lead to XSS vulnerabilities, and in the best case, to more realistic phishing attacks and open redirects. We force it rather than falling back to it when other disposition is not provided. Otherwise it would be possible for someone to force inline just by passing `disposition=inline` in the URL. The list of content types to be served as attachments is configurable.
* Restore support for the -layers transformationGeorge Claghorn2018-01-021-14/+14
|
* prevent shadowing outer variablesDorian Marié2017-12-251-4/+4
|
* Add support for combined MiniMagick transformationsRobert Glaser2017-12-221-6/+16
|
* [ci skip] Remove needless from doc for ActiveStorage::VariantYoshiyuki Hirano2017-12-221-1/+1
|
* Delete MiniMagick tempfile when transformation failsGeorge Claghorn2017-12-181-1/+7
|
* Ensure MiniMagick tempfiles are properly unlinked after image transformationGeorge Claghorn2017-12-181-9/+18
|
* Convert non-web image (e.g. PSD) variants to PNGGeorge Claghorn2017-12-181-3/+34
|
* Update ActiveStorage::Blob#transformation docs [ci skip]George Claghorn2017-12-161-3/+3
|
* Restrict variants to variable image blobsGeorge Claghorn2017-12-151-4/+18
|
* Exclude ActiveStorage::Filename{#parameters,::Parameters} from API docs [ci ↵George Claghorn2017-12-132-2/+2
| | | | skip]
* Fix optimizing GIF variants using mogrify's -layers optionGeorge Claghorn2017-12-111-5/+7
|
* Revert "Invoke mogrify once when transforming an image"George Claghorn2017-12-111-8/+6
| | | | This reverts commit a80f81af055f02bf4625c90470aa90441cf6fc24.
* Invoke mogrify once when transforming an imageGeorge Claghorn2017-12-111-6/+8
| | | | Execute a single mogrify command with multiple options rather than one command per option. Permit the use of all mogrify options, not just the ones that fall through to MiniMagick::Image#method_missing.
* Purge variants with their blobsGeorge Claghorn2017-12-021-1/+2
|
* Preserve existing metadata when analyzing a blobGeorge Claghorn2017-11-131-1/+1
| | | | Closes #31138.
* Extract metadata from images and videosGeorge Claghorn2017-10-222-1/+63
|
* Clarify comment [ci skip]George Claghorn2017-10-131-1/+1
|
* Accept variation keys in #preview and #variantGeorge Claghorn2017-10-122-7/+12
|
* Introduce ActiveStorage::Blob#representationGeorge Claghorn2017-10-122-0/+30
|
* Replace variation key use with SHA256 of key to prevent long filenameskhall2017-10-051-1/+1
| | | | | | | If a variant has a large set of options associated with it, the generated filename will be too long, causing Errno::ENAMETOOLONG to be raised. This change replaces those potentially long filenames with a much more compact SHA256 hash. Fixes #30662.
* Fix third-party system libraries list in ActiveStorage::Preview [ci skip]Yoshiyuki Hirano2017-10-041-2/+2
|
* Associate blobs with their attachmentsGeorge Claghorn2017-10-031-0/+2
|
* Preview PDFs and videosGeorge Claghorn2017-09-284-11/+141
|
* Add missing word [ci skip]George Claghorn2017-09-201-1/+1
|
* Flesh out ActiveStorage::Filename docsGeorge Claghorn2017-09-201-6/+14
|
* Remove unused require in ActiveStorage::VariationYoshiyuki Hirano2017-09-181-2/+0
|
* Have attachments touch their recordsGeorge Claghorn2017-08-311-1/+1
|
* Update Active Storage docs [ci skip]Yoshiyuki Hirano2017-08-302-7/+15
|
* Synchronously destroy attachmentsGeorge Claghorn2017-08-291-6/+4
|
* Enable links in Active Storage docs [ci skip]Yoshiyuki Hirano2017-08-262-2/+2
|
* Fix link in doc for active storage [ci skip]Yoshiyuki Hirano2017-08-251-1/+1
|
* Add frozen string literal pragmaGeorge Claghorn2017-08-211-0/+2
|
* Encode Content-Disposition filenames according to RFC 2231George Claghorn2017-08-213-1/+39
| | | | Closes #30134.
* DRYGeorge Claghorn2017-08-201-1/+1
|
* Rename ActiveStorage::Filename#extname to extension_with_delimiterGeorge Claghorn2017-08-201-9/+11
|
* restores some double newlines deleted in ae87217Xavier Noria2017-08-152-0/+4
| | | | | | These were intentional, see https://github.com/rails/rails/pull/30061#issuecomment-320068368