Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aon-app-server
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
aon-app-server
Commits
3d5a8a28
Commit
3d5a8a28
authored
Jul 22, 2024
by
brent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify app.conf
parent
938dcc37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
app.conf
conf/app.conf
+7
-1
task.go
controllers/task.go
+4
-1
lastupdate.tmp
lastupdate.tmp
+1
-1
No files found.
conf/app.conf
View file @
3d5a8a28
...
...
@@ -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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"
...
...
controllers/task.go
View file @
3d5a8a28
...
...
@@ -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
),
...
...
lastupdate.tmp
View file @
3d5a8a28
{"/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment