upload URL moved to env variable

This commit is contained in:
Jonathan Barrow 2021-10-05 09:19:51 -04:00
parent cefe5ecedb
commit 08cdd1dc4e
2 changed files with 4 additions and 2 deletions

View File

@ -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{}

View File

@ -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{}