Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
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
Show 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')
SITE_PORT
=
config
.
get
(
'store'
,
'site_port'
)
# Temporary dir for tar.gz
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
try
:
FORCE_SSL
=
config
.
get
(
'store'
,
'force_ssl'
)
==
"True"
...
...
@@ -288,8 +293,12 @@ def upload(hash_num):
for
chunk
in
fbuffer
(
file_data
.
file
):
f
.
write
(
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