aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib/active_storage/service/azure_storage_service.rb
Commit message (Collapse)AuthorAgeFilesLines
* Handle only specifically relevant Azure HTTPErrorsCameron Bothner2018-08-231-5/+7
| | | | | | | | | The Azure gem uses `Azure::Core::Http::HTTPError` for everything: checksum mismatch, missing object, network unavailable, and many more. (https://www.rubydoc.info/github/yaxia/azure-storage-ruby/Azure/Core/Http/HTTPError). Rescuing that class obscures all sorts of configuration errors. We should check the type of error in those rescue blocks, and reraise when needed.
* Revert "Merge pull request #33667 from ↵George Claghorn2018-08-231-13/+7
| | | | | | | cbothner/azure-service-swallowing-all-errors" This reverts commit b204d167c5cfebd59f771d406178e371811ac43a, reversing changes made to de6a200f82a3de399fa685d583503bc88dbc5e9f.
* Handle only specifically relevant Azure HTTPErrorsCameron Bothner2018-08-231-7/+13
| | | | | | | | | The Azure gem uses `Azure::Core::Http::HTTPError` for everything: checksum mismatch, missing object, network unavailable, and many more. (https://www.rubydoc.info/github/yaxia/azure-storage-ruby/Azure/Core/Http/HTTPError). Rescuing that class obscures all sorts of configuration errors. We should check the type of error in those rescue blocks, and reraise when needed.
* Translate service-specific missing object exceptions into a generic oneCameron Bothner2018-08-211-4/+20
| | | | | | | | | `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`.
* Fix uploading Tempfiles to Azure StorageGeorge Claghorn2018-08-031-1/+1
| | | | Closes #32530.
* Fix Azure signed URL generation with newer client libGeorge Claghorn2018-03-121-6/+4
|
* Remove path config option from Azure serviceAndrew White2018-03-121-6/+10
| | | | | | | | | | | The Active Storage service for Azure Storage has an option called `path` that is ambiguous in meaning. It needs to be set to the primary blob storage endpoint but that can be determined from the blobs client anyway. To simplify the configuration this commit removes the `path` option and gets the endpoint from the blobs client instead. Closes #32225.
* Generate root-relative paths in Active Storage disk service URL methodsGeorge Claghorn2018-03-051-0/+7
| | | | Fixes #32129.
* Return `nil` instead of `false` if raise `Azure::Core::Http::HTTPError`Yoshiyuki Hirano2017-12-121-1/+1
| | | | | | | * If it raise error `Azure::Core::Http::HTTPError`, return `nil` instead of `false` in `ActiveStorage::Service::AzureStorageService#delete`. * Other services behave as same as this.
* Fix instrumention name: delete_prefixed like the others.Kasper Timm Hansen2017-12-031-1/+1
|
* Purge variants with their blobsGeorge Claghorn2017-12-021-7/+23
|
* Fix streaming downloads from S3/Azure StorageGeorge Claghorn2017-11-061-4/+4
| | | Closes #31073.
* Preview PDFs and videosGeorge Claghorn2017-09-281-1/+1
|
* DRYGeorge Claghorn2017-08-201-4/+8
|
* 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
* Support content_type in AzureStorageService#urlMike Gunderloy2017-08-081-2/+3
| | | | | | | | Add in the content_type option, which is defined as part of the generic ActiveStorage::Service class. Without this option, attempts to generate a URL for an attached file fail with "ArgumentError (unknown keyword: content_type)"
* Merge branch 'master' into ast-moduleDavid Heinemeier Hansson2017-08-051-1/+1
|\
| * Remove unecesarry exception variabledixpac2017-08-051-1/+1
| |
* | `module ActiveStorage`, not `ActiveStorage::Class`claudiob2017-08-041-83/+85
|/ | | | | | | | | | | | | | | | | | 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">
* Rename Azure to AzureStorage (#30057)Dino Maric2017-08-041-0/+115