Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
ftpupload
Commits
f0556f0f
Commit
f0556f0f
authored
Dec 13, 2017
by
Julian Rother
Browse files
Adapted ftpd to actual autoencode api
parent
5a865145
Changes
1
Hide whitespace changes
Inline
Side-by-side
ftpd.py
View file @
f0556f0f
...
...
@@ -18,8 +18,7 @@ def on_file_received(handler, path):
num
+=
1
suffix
=
'.'
+
str
(
num
)
os
.
rename
(
RAW_TMP
+
'/'
+
path
,
RAW_TARGET
+
'/'
+
path
+
suffix
)
path
=
RAW_PREFIX
+
'/'
+
path
+
suffix
requests
.
get
(
API_BASEURL
+
'/internal/sort/raw'
,
params
=
{
'apikey'
:
API_APIKEY
,
'path'
:
path
})
requests
.
get
(
API_BASEURL
+
'/internal/sort/autoencode'
,
params
=
{
'apikey'
:
API_APIKEY
,
'path'
:
path
+
suffix
})
else
:
print
(
"Unknown path:"
,
path
)
...
...
Write
Preview
Supports
Markdown
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