direct_upload-gcs 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +16 -7
- data/lib/direct_upload/gcs.rb +1 -1
- data/lib/direct_upload/gcs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af798965537d7f1e7e949387e682e819d5a96a88
|
4
|
+
data.tar.gz: db8b2bde661ca83ea749dea6dc1efe2eb24c197f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1470da74496a82161b32a81652e02760cf01e9f35c21c62ad05ac238a068cfc1dd1b3429a059d200e70e2630d11c521fb3b8c94bba69711667a044cb4ef9e69
|
7
|
+
data.tar.gz: 1ced747d600c41d33a018dd0ebefb6897711cb31d02bae5764a2022de5fba71b19b8fc892b31775fa8db7a5d865349825024fea04b69bc28d7463fa7df244796
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
# DirectUpload::Gcs
|
2
2
|
|
3
|
-
|
3
|
+
Generate a signed url in Ruby.
|
4
4
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
5
|
|
7
6
|
## Installation
|
8
7
|
|
@@ -22,12 +21,18 @@ Or install it yourself as:
|
|
22
21
|
|
23
22
|
## Usage
|
24
23
|
|
25
|
-
|
26
|
-
|
24
|
+
Ex:
|
25
|
+
```
|
27
26
|
DirectUpload::Gcs.new('put', '1/abc.jpeg', 20.minutes, 'image/jpeg', 'bucket_wow', 'lib/key_file.json').signed_url
|
28
|
-
|
27
|
+
```
|
28
|
+
Method signature
|
29
|
+
```
|
29
30
|
DirectUpload::Gcs.new(method, file_name, time_in_mins, content_type, bucket, path_to_key_file).signed_url
|
31
|
+
```
|
30
32
|
|
33
|
+
The returned signature can be used for multiple actions from client or server side to operate on assets on GC.
|
34
|
+
|
35
|
+
I have used to handle file uploads from client front.
|
31
36
|
|
32
37
|
## Development
|
33
38
|
|
@@ -43,10 +48,14 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
|
|
43
48
|
|
44
49
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
45
50
|
|
46
|
-
## Code of Conduct
|
47
51
|
|
48
|
-
|
52
|
+
Source:
|
49
53
|
|
50
54
|
http://andrewvos.com/uploading-files-directly-to-google-cloud-storage-from-client-side-javascript
|
55
|
+
|
56
|
+
Setup Ruby Gem:
|
57
|
+
|
51
58
|
https://bundler.io/v1.15/guides/creating_gem.html
|
59
|
+
|
60
|
+
|
52
61
|
https://quickleft.com/blog/engineering-lunch-series-step-by-step-guide-to-building-your-first-ruby-gem/
|
data/lib/direct_upload/gcs.rb
CHANGED