Initial commit
This commit is contained in:
31
docs/zagros/uploader/uploader.md
Normal file
31
docs/zagros/uploader/uploader.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Uploader
|
||||
|
||||
The uploader **principle** defines that who is responsible for saving any document type in the system and how does it.
|
||||
|
||||
the Opendax support these providers as uploader type
|
||||
`local` `google` `aws` `alicloud`
|
||||
|
||||
for `google`, `aws`, and `local` type, the UploadUploader class is a provider,
|
||||
this class is a child from this gem :
|
||||
[carrierwave](https://github.com/carrierwaveuploader/carrierwave)
|
||||
|
||||
**path of file** : app/uploaders/upload_uploader.rb
|
||||
|
||||
but for `alicloud` type, the provider is `AliUploader` class
|
||||
|
||||
**path of file** : app/uploaders/ali_uploader.rb that this class in the child of carrierwave gem too.
|
||||
|
||||
|
||||
in the `Dalan` version, we save files without any encryption
|
||||
and use only `local` type for uploader and this config exist in alvand/config/app.yml
|
||||
|
||||
the path of uploaded file is :
|
||||
|
||||
```"public/uploads/#{model.class.to_s.underscore}/upload/#{model.id}"
|
||||
example : public/uploads/document/upload/1/front_card.png
|
||||
```
|
||||
###TODO
|
||||
#### [Fog](https://fog.io/storage/)
|
||||
in app/uploaders/upload_uploader.rb , we change the config code to hardcode to always use `local` type,
|
||||
if you want to use fog type you must revert these lines:
|
||||
line 4 to 12
|
||||
Reference in New Issue
Block a user