Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chiefs
ChiefSend2
Commits
4f66669f
Commit
4f66669f
authored
Mar 27, 2021
by
Lukas Böhm
Browse files
first steps
parent
02984a14
Changes
3
Hide whitespace changes
Inline
Side-by-side
web-flask/routes.py
View file @
4f66669f
...
...
@@ -96,8 +96,4 @@ def media(share_id, file_id):
@
app
.
route
(
'/upload'
,
methods
=
[
'GET'
,
'POST'
])
def
upload
():
if
request
.
method
==
'POST'
:
# finalize
return
render_template
(
'Shared.html'
,
url
=
'HALLO'
)
return
render_template
(
'Upload.html'
)
return
render_template
(
'Upload.html'
)
\ No newline at end of file
web-flask/templates/About.html
View file @
4f66669f
...
...
@@ -11,7 +11,7 @@
<h1>
Über
</h1>
<p>
Diese Seite ist aus Trauer um Firefox Send entstanden.
<a
class=
"nav-link"
href=
"https://gitlab.cs.fau.de/
ib49uquh
/chiefsend"
>
Quellcode
</a>
<a
class=
"nav-link"
href=
"https://gitlab.cs.fau.de/
chiefs
/chiefsend
2
"
>
Quellcode
</a>
</p>
<h2>
Impressum
</h2>
...
...
web-flask/templates/Upload.html
View file @
4f66669f
...
...
@@ -7,7 +7,7 @@
</div>
<div
class=
"card mb-4 text-center shadow"
id=
"app"
>
<form
method=
"post"
enctype=
"multipart/form-data"
>
<form
enctype=
"multipart/form-data"
id=
"form"
>
<div
class=
"card-header"
>
<h4
class=
"my-0 font-weight-normal"
>
<input
autocomplete=
"off"
class=
"form-control"
id=
"name"
maxlength=
"64"
name=
"name"
placeholder=
"Name vergeben (optional)"
size=
"64"
type=
"text"
value=
""
>
...
...
@@ -40,25 +40,14 @@
</div>
<div
class=
"form-group"
>
<input
class=
"btn btn-lg btn-block btn-primary"
id=
"submit"
name=
"submit"
type=
"button"
value=
"Hochladen"
>
<input
class=
"btn btn-lg btn-block btn-primary"
id=
"submit"
name=
"submit"
type=
"button"
value=
"Hochladen"
onclick=
"openShare()"
>
</div>
</div>
</form>
</div>
<script
src=
"https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"
></script>
<script
src=
"{{ url_for('static', filename='js/jquery.form.min.js') }}"
></script>
<script>
var
app
=
new
Vue
({
el
:
'
#app
'
,
data
:
{
message
:
'
Hello Vue!
'
}
})
</script>
{#
<script
src=
"{{ url_for('static', filename='js/jquery.form.min.js') }}"
></script>
#}
<style>
.truncate
{
width
:
100%
;
...
...
@@ -80,16 +69,40 @@
});
</script>
<script>
let
share
=
{}
function
openShare
()
{
$
.
ajax
()
$
.
ajax
({
"
url
"
:
"
http://localhost:6969/shares
"
,
"
method
"
:
"
POST
"
,
"
timeout
"
:
0
,
"
headers
"
:
{
"
Content-Type
"
:
"
application/json
"
},
"
data
"
:
JSON
.
stringify
({}),
}).
done
((
response
)
=>
{
share
=
response
;
disableAll
();
uploadFile
();
});
}
function
uploadFile
()
{
closeShare
();
}
function
closeShare
()
{
$
.
ajax
({
"
url
"
:
`http://localhost:6969/share/
${
share
.
id
}
`
,
"
method
"
:
"
POST
"
,
"
timeout
"
:
0
,
"
headers
"
:
{
"
Content-Type
"
:
"
application/json
"
},
"
data
"
:
JSON
.
stringify
({}),
}).
done
(()
=>
{
window
.
location
.
href
=
"
/d/
"
+
share
.
id
});
}
</script>
<script>
...
...
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