https://github.com/3ru/rails-api-template-gcp
Template file for rails api which can upload image to GCP cloud
https://github.com/3ru/rails-api-template-gcp
gcp-cloud-functions ruby templates
Last synced: 25 days ago
JSON representation
Template file for rails api which can upload image to GCP cloud
- Host: GitHub
- URL: https://github.com/3ru/rails-api-template-gcp
- Owner: 3ru
- Created: 2021-01-18T13:15:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-21T04:23:19.000Z (over 5 years ago)
- Last Synced: 2025-02-25T14:49:46.260Z (over 1 year ago)
- Topics: gcp-cloud-functions, ruby, templates
- Language: Ruby
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Upload image to gcp clound storage by using rails api
1. make api key and put it on `/app/key/[gcpkey.json]`
(ofc, no key file in this repository)
2. Uncomment out the GCP section.
(Since there is no storage.yml in this repository, u need to create it `config/storage.yml`)
```
google:
service: GCS
project: hoge
credentials: <%= Rails.root.join("./key/gcpkey.json") %>
bucket: hoge
```
- Can also switch to saving to local.
```
- config.active_storage.service = :google
+ config.active_storage.service = :local
```
### Prob
- Cannot be saved at the same time as normal data.