Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3232dcc5
authored
Feb 04, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added redrect after upload finished
parent
03ba3c5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
miscellaneous/store-server/CloudStore.py
+11
-2
No files found.
miscellaneous/store-server/CloudStore.py
View file @
3232dcc5
...
@@ -23,6 +23,11 @@ SITE_HOST = config.get('store', 'site_host')
...
@@ -23,6 +23,11 @@ SITE_HOST = config.get('store', 'site_host')
SITE_PORT
=
config
.
get
(
'store'
,
'site_port'
)
SITE_PORT
=
config
.
get
(
'store'
,
'site_port'
)
# Temporary dir for tar.gz
# Temporary dir for tar.gz
TEMP_DIR
=
config
.
get
(
'store'
,
'temp_dir'
)
TEMP_DIR
=
config
.
get
(
'store'
,
'temp_dir'
)
#Redirect
try
:
REDIRECT_URL
=
config
.
get
(
'store'
,
'redirect_url'
)
except
:
REDIRECT_URL
=
"https://cloud.ik.bme.hu"
#ForceSSL
#ForceSSL
try
:
try
:
FORCE_SSL
=
config
.
get
(
'store'
,
'force_ssl'
)
==
"True"
FORCE_SSL
=
config
.
get
(
'store'
,
'force_ssl'
)
==
"True"
...
@@ -288,8 +293,12 @@ def upload(hash_num):
...
@@ -288,8 +293,12 @@ def upload(hash_num):
for
chunk
in
fbuffer
(
file_data
.
file
):
for
chunk
in
fbuffer
(
file_data
.
file
):
f
.
write
(
chunk
)
f
.
write
(
chunk
)
datalength
+=
len
(
chunk
)
datalength
+=
len
(
chunk
)
return
'Upload finished: '
+
file_name
+
' - '
+
str
(
datalength
)
+
' Byte'
try
:
redirect_address
=
request
.
headers
.
get
(
'Referer'
)
except
:
redirect_address
=
REDIRECT_URL
redirect
(
redirect_address
)
#return 'Upload finished: '+file_name+' - '+str(datalength)+' Byte'
...
...
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