Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2020-077
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2020-077
2020-077
Commits
be2fbb69
Commit
be2fbb69
authored
Nov 05, 2020
by
G.M. Amashi S. Bastiansz
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new comments to component files
parent
15f99512
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
12 deletions
+46
-12
reveng/gifDisplay.py
reveng/gifDisplay.py
+11
-4
reveng/gifDisplayMain.py
reveng/gifDisplayMain.py
+10
-1
reveng/templates/index.html
reveng/templates/index.html
+8
-3
reveng/templates/upload.html
reveng/templates/upload.html
+9
-1
templates/index.html
templates/index.html
+8
-3
No files found.
reveng/gifDisplay.py
View file @
be2fbb69
"""
This file is used to display the created GIF to user
This file is still at testing phase
This file is still at TESTING PHASE
@author Amashi Bastiansz | IT17143950
@version 1.2
...
...
@@ -22,7 +23,7 @@ app = Flask(__name__)
def
allowed_file
(
filename
):
"""
This method is used check the extension of
crea
ted file
This method is used check the extension of
selec
ted file
@return the extension to check whether it is allowed
"""
...
...
@@ -33,9 +34,10 @@ def allowed_file(filename):
@
app
.
route
(
'/'
,
methods
=
[
'POST'
])
def
upload_image
():
"""
This method is used check the extension of created file
This method is used upload the selected file to the exact folder
after checking whether the extensions are matched.
@return
the extension to check whether it is allowed
@return
redirect to upload.html
"""
if
'file'
not
in
request
.
files
:
...
...
@@ -57,6 +59,11 @@ def upload_image():
@
app
.
route
(
'/display/<filename>'
)
def
display_image
(
filename
):
"""
This method is used display the uploaded file back to the user
@return display the file in the interface
"""
return
redirect
(
url_for
(
'static'
,
filename
=
'uploads/'
+
filename
),
code
=
301
)
...
...
reveng/gifDisplayMain.py
View file @
be2fbb69
########################## To display the created GIF to user #############################
"""
This file is used to display the created GIF to the user on the interface
Still in TESTING phase
@author Amashi Bastiansz | IT17143950
@version 1.5
@since 2020-10-01
"""
from
flask
import
Flask
main
=
Flask
(
__name__
)
# create and initialize a new folder to upload created GIFS
UPLOAD_FOLDER
=
'static/uploads/'
main
.
secret_key
=
"secret key"
...
...
reveng/templates/index.html
View file @
be2fbb69
<!--IT17143950 16-05-2020
1, Created
for testing purposes... Do not edit without permission -->
<!--
* The file is to create a form for Text to SSL Translator
* For TESTING purposes
*
* @author Amashi Bastiansz | IT17143950
* @version 1.0
* @since 2020-05-31
-->
<!DOCTYPE html>
<html>
...
...
reveng/templates/upload.html
View file @
be2fbb69
<!--To display the created GIF to user -->
<!--
* The file is to create a form for uploading and display files
* For TESTING purposes
*
* @author Amashi Bastiansz | IT17143950
* @version 1.0
* @since 2020-10-01
-->
<!doctype html>
<html>
...
...
templates/index.html
View file @
be2fbb69
<!--IT17143950 16-05-2020
1, Created
for testing purposes... Do not edit without permission -->
<!--
* The file is to create a form for Text to SSL Translator
* For TESTING purposes
*
* @author Amashi Bastiansz | IT17143950
* @version 1.0
* @since 2020-10-01
-->
<!DOCTYPE html>
<html>
...
...
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