administrate-field-active_storage 0.1.4 → 0.1.5
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/README.md +14 -0
- data/administrate-field-active_storage.gemspec +1 -1
- data/app/views/fields/active_storage/_form.html.erb +1 -1
- data/contribute.md +2 -0
- data/lib/administrate/field/active_storage.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 755d9602f84c45d4532a6b4558eac449ecca6402
|
4
|
+
data.tar.gz: 9df7c208e8ca73ba25760f722455aaf408dc4aab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 698a627b2ce86f2082ceae2d5c834826a0276a5c34c6571d4dddf4c56e3d6051093a2dde9c2a4eb36bb72d719321c8b9a46bdc6f22d8f9b533d5cbab16165983
|
7
|
+
data.tar.gz: 3c85acf2dc15008185de90f0b1659260ccbeefb7418432e5778e7a86751224b686639849d05f9eb028415ed1d4cdfe9e9fc0543312258fabd69d7a6e5e6a4b17
|
data/README.md
CHANGED
@@ -87,6 +87,20 @@ class ModelDashboard < Administrate::BaseDashboard
|
|
87
87
|
end
|
88
88
|
```
|
89
89
|
|
90
|
+
### direct_upload
|
91
|
+
If you want to upload directly from the browser to the cloud you can use direct_upload
|
92
|
+
```ruby
|
93
|
+
class ModelDashboard < Administrate::BaseDashboard
|
94
|
+
ATTRIBUTE_TYPES = {
|
95
|
+
attachments: Field::ActiveStorage.with_options({direct_upload: true}),
|
96
|
+
# ...
|
97
|
+
}
|
98
|
+
# ...
|
99
|
+
end
|
100
|
+
```
|
101
|
+
|
102
|
+
Don't forget to include [ActiveStorage JavaScript](https://edgeguides.rubyonrails.org/active_storage_overview.html#direct-uploads). You can use `rails generate administrate:assets:javascripts` to be able to customize Administrate JavaScripts in your application.
|
103
|
+
|
90
104
|
## Things To Do:
|
91
105
|
- [x] upload single file
|
92
106
|
- [x] adding image support through url_for to support 3rd party cloud storage
|
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "administrate-field-active_storage"
|
5
|
-
gem.version = "0.1.
|
5
|
+
gem.version = "0.1.5"
|
6
6
|
gem.authors = ["Hamad AlGhanim"]
|
7
7
|
gem.email = ["hamadyalghanim@gmail.com"]
|
8
8
|
gem.homepage = "https://github.com/Dreamersoul/administrate-field-active_storage"
|
data/contribute.md
CHANGED
@@ -3,3 +3,5 @@
|
|
3
3
|
- Patrick Gleeson [@patrick-gleeson](https://github.com/patrick-gleeson)
|
4
4
|
- Mario Zigliotto [@mariozig](https://github.com/mariozig)
|
5
5
|
- Leif Gensert [@leifg](https://github.com/leifg)
|
6
|
+
- Kadu Diógenes [@cerdiogenes](https://github.com/cerdiogenes)
|
7
|
+
- Peter Bhat Harkins [@pushcx](https://github.com/pushcx)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate-field-active_storage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hamad AlGhanim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: administrate
|