diff --git a/prepare_attach_file.go b/prepare_attach_file.go index 46b0622..3fcda84 100644 --- a/prepare_attach_file.go +++ b/prepare_attach_file.go @@ -5,6 +5,7 @@ import ( "crypto/sha256" "encoding/hex" "fmt" + "os" "strconv" "time" @@ -58,7 +59,7 @@ func prepareAttachFile(err error, client *nex.Client, callID uint32, dataStoreAt pReqPostInfo := nexproto.NewDataStoreReqPostInfo() pReqPostInfo.DataID = dataStoreAttachFileParam.ReferDataID - pReqPostInfo.URL = "http://datastore.pretendo.cc/upload" + pReqPostInfo.URL = os.Getenv("DATASTORE_UPLOAD_URL") pReqPostInfo.RequestHeaders = []*nexproto.DataStoreKeyValue{} pReqPostInfo.FormFields = []*nexproto.DataStoreKeyValue{fieldBucket, fieldKey, fieldACL, fieldContentType, fieldPID, fieldDate, fieldSignature} pReqPostInfo.RootCACert = []byte{} diff --git a/prepare_post_object.go b/prepare_post_object.go index 192cb07..5875537 100644 --- a/prepare_post_object.go +++ b/prepare_post_object.go @@ -6,6 +6,7 @@ import ( "encoding/hex" "fmt" "math/rand" + "os" "strconv" "time" @@ -77,7 +78,7 @@ func preparePostObject(err error, client *nex.Client, callID uint32, param *nexp pReqPostInfo := nexproto.NewDataStoreReqPostInfo() pReqPostInfo.DataID = dataID - pReqPostInfo.URL = "http://datastore.pretendo.cc/upload" + pReqPostInfo.URL = os.Getenv("DATASTORE_UPLOAD_URL") pReqPostInfo.RequestHeaders = []*nexproto.DataStoreKeyValue{} pReqPostInfo.FormFields = []*nexproto.DataStoreKeyValue{fieldBucket, fieldKey, fieldACL, fieldPID, fieldDate, fieldSignature} pReqPostInfo.RootCACert = []byte{}