mirror of
https://github.com/documize/community.git
synced 2025-07-23 07:09:43 +02:00
major package structure refactoring
This commit is contained in:
parent
7b8cec9a6c
commit
cf58f8164d
73 changed files with 549 additions and 389 deletions
|
@ -24,12 +24,10 @@ import (
|
|||
"github.com/documize/community/core/api/request"
|
||||
"github.com/documize/community/core/api/util"
|
||||
"github.com/documize/community/core/log"
|
||||
|
||||
uuid "github.com/nu7hatch/gouuid"
|
||||
|
||||
"github.com/documize/community/core/secrets"
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
_ "github.com/mytrile/mime-ext" // this adds a large number of mime extensions
|
||||
uuid "github.com/nu7hatch/gouuid"
|
||||
)
|
||||
|
||||
// AttachmentDownload is the end-point that responds to a request for a particular attachment
|
||||
|
@ -198,7 +196,7 @@ func AddAttachments(w http.ResponseWriter, r *http.Request) {
|
|||
a.RefID = refID
|
||||
a.DocumentID = documentID
|
||||
a.Job = job
|
||||
random := util.GenerateSalt()
|
||||
random := secrets.GenerateSalt()
|
||||
a.FileID = random[0:9]
|
||||
a.Filename = filename.Filename
|
||||
a.Data = b.Bytes()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue