Initial commit

This commit is contained in:
Yaser
2026-08-13 19:56:46 +03:30
commit de1d57a67b
474 changed files with 43185 additions and 0 deletions

View 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