Commit 3d5a8a28 authored by brent's avatar brent

modify app.conf

parent 938dcc37
......@@ -28,9 +28,12 @@ imageTransferUrl = "https://tmp-file.aigic.ai/api/v1/down/put"
replicateToken = "r8_9OCCea50go2Qkh0f0jhu3DbNjyzuyt61VNVI6"
replicateTimeout = 10
bucketName = "ai-watermark"
region = "us-west-2"
awsAccessKeyID = "AKIAYS2NSY7MVGYC2W7M"
awsSecretAccessKey = "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"
[prod]
whoisApi = "aonet"
whoisApi = "replicate"
apikey = "Rbhpcp0FKNrYNA1nZkrwrIbD0YSSRlVG"
taskUrl = "https://api.aonet.ai/api/v1"
imageUrl = "https://tmp-file.aigic.ai/api/v1/upload/persistence"
......@@ -38,6 +41,9 @@ imageTransferUrl = "https://tmp-file.aigic.ai/api/v1/down/put"
replicateToken = "r8_9OCCea50go2Qkh0f0jhu3DbNjyzuyt61VNVI6"
replicateTimeout = 10
bucketName = "ai-watermark"
region = "us-west-2"
awsAccessKeyID = "AKIAYS2NSY7MVGYC2W7M"
awsSecretAccessKey = "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"
......
......@@ -27,6 +27,7 @@ import (
"os"
"path"
"reflect"
"strconv"
"strings"
"time"
)
......@@ -298,7 +299,9 @@ func uploadToS3(bucket, key string, img image.Image, format string) (string, err
filePath := "watermark"
key = filePath + "/" + key
timestamp := time.Now().Unix()
timestampStr := strconv.FormatInt(timestamp, 10)
key = filePath + "/" + timestampStr + "_" + key
_, err = client.PutObject(context.TODO(), &s3.PutObjectInput{
Bucket: aws.String(bucket),
......
{"/Users/brent/Documents/wubanWork/aon_app_server/controllers":1721643676253627085}
\ No newline at end of file
{"/Users/brent/Documents/wubanWork/aon_app_server/controllers":1721645388613888313}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment