aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib/active_storage/service/gcs_service.rb
Commit message (Collapse)AuthorAgeFilesLines
* Translate service-specific missing object exceptions into a generic oneCameron Bothner2018-08-211-2/+12
| | | | | | | | | `ActiveStorage::Blob#download` and `ActiveStorage::Blob#open` raise `ActiveStorage::FileNotFoundError` when the corresponding file is missing from the storage service. Services translate service-specific missing object exceptions (e.g. `Google::Cloud::NotFoundError` for the GCS service and `Errno::ENOENT` for the disk service) into `ActiveStorage::FileNotFoundError`.
* Remove another unused requireGeorge Claghorn2018-08-021-2/+0
|
* Remove unused requireGeorge Claghorn2018-08-011-2/+0
|
* Ignore concurrently-deleted files when deleting by prefix from GCSGeorge Claghorn2018-07-301-1/+7
|
* Remove vestigial require on ActiveStorage GCSServiceBibek Shrestha2018-07-041-1/+0
| | | | | | | | | | | | The file `filename.rb` as mentioned in `require "active_storage/filename"` belongs to the `app` folder while GCSService belongs to the lib folder. Looking at the git blame, it was added in commit https://github.com/rails/rails/commit/ccac681122db9747fec9512076772bca345e24b9#diff-bda6a610ef1575b2c8458c96b7f12578 where ActiveStorage::Filename was actually used. But it is no longer required on master and therefore can be removed. This allows anyone to use GCSService directly without enabling ActiveStorage engine.
* Support streaming downloads from Google Cloud StorageGeorge Claghorn2018-05-011-19/+25
|
* Avoid duplicating downloads from Google Cloud Storage in memoryGeorge Claghorn2018-04-291-2/+2
| | | | References #32703.
* Simplify URL generation for partial downloads from GCSGeorge Claghorn2018-04-251-1/+2
|
* Remove blank Content-Type from GCS direct upload headersGeorge Claghorn2018-03-061-1/+1
| | | | Since we started clearing the client-side blob's type in e0867b3, we no longer need to set a blank Content-Type header before issuing the direct upload request. Fixes that Safari 9 would combine the blank Content-Type header with the blank blob type to produce a Content-Type header containing a single comma, invalidating the request.
* Generate root-relative paths in Active Storage disk service URL methodsGeorge Claghorn2018-03-051-0/+13
| | | | Fixes #32129.
* Avoid specifying content types for direct uploads to Google Cloud StorageGeorge Claghorn2018-02-261-5/+4
| | | | Fix customizing the download Content-Type for a directly-uploaded blob via a signed URL. See e8286ee.
* Fix customizing Content-Type via GCS service URLsGeorge Claghorn2017-12-071-1/+7
|
* Purge variants with their blobsGeorge Claghorn2017-12-021-6/+12
|
* Use `credentials` instead of `keyfile` in GCS seviceyuuji.yaginuma2017-11-291-0/+2
| | | | | | | | | | | | | The `keyfile` was renamed to `credentials` in `google-cloud-storage` 1.8.0. https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-storage/CHANGELOG.md#180--2017-11-14 Although `keyfile` can still be used, but it looks like deprecate. https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/ddf7b2a856d676316525eb581c1a4cc83ca6097b/google-cloud-storage/lib/google/cloud/storage.rb#L589...L590 Therefore, I think that should use `credentials` in newly generated applications. Ref: https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues/1802
* Avoid connecting to GCS during app bootGeorge Claghorn2017-11-231-5/+12
|
* Preview PDFs and videosGeorge Claghorn2017-09-281-3/+8
|
* Avoid making HTTP requests to generate signed URLs for GCS objectsGeorge Claghorn2017-09-131-3/+3
|
* Accept GCS client optionsGeorge Claghorn2017-09-011-2/+2
|
* Ignore files already deleted on GCS file deletionsRosa Gutierrez2017-08-311-1/+5
| | | | | | | | Relying on the GET request issued first to fetch the file we want to delete is not enough to avoid this error. If the file is deleted after our GET request but before the DELETE request we'll get a NotFound error that after all means that the file is already deleted, so it can be safely ignored.
* DRYGeorge Claghorn2017-08-201-2/+2
|
* minor tweaks in Active Storage after a walkthroughXavier Noria2017-08-151-1/+1
|
* Use frozen string literal in Active StorageKoichi ITO2017-08-121-0/+2
|
* Fix formatting of Active Storage docs [ci skip]yuuji.yaginuma2017-08-111-1/+1
| | | | | * Use `+` instead of backquote. * Remove escape from class to be link
* `module ActiveStorage`, not `ActiveStorage::Class`claudiob2017-08-041-55/+57
| | | | | | | | | | | | | | | | | | The reasons for this commit are: - uniformity with the other Rails libraries - (possibly) behave better with respect to autoloading - fix the index in the generated documentation Before this commit, run `rake rdoc` generates this left sidebar (ActiveStorage entries are indexed twice, both inside and outside the module): <img width="308" alt="before" src="https://user-images.githubusercontent.com/10076/28939523-7c087dec-7846-11e7-9289-38ed4a2930cd.png"> After this commit, run `rake rdoc` generates this left sidebar: (ActiveStorage entries are only indexed inside the module): <img width="303" alt="after" src="https://user-images.githubusercontent.com/10076/28939524-7c090be0-7846-11e7-8ee5-29dfecae548e.png">
* Add 'activestorage/' from commit '3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58'Rafael Mendonça França2017-07-311-0/+79
git-subtree-dir: activestorage git-subtree-mainline: 0d58e7e478e79c2d6b2a39a4444d2a17a903b2a6 git-subtree-split: 3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58