From efce5ec6abd005853e04661e4c8ecb51b037cc9b Mon Sep 17 00:00:00 2001 From: andri Date: Mon, 15 Sep 2025 03:56:19 +0000 Subject: [PATCH] Upload files to "templates" --- templates/base.html | 40 +++++++++++++++ templates/files.html | 98 ++++++++++++++++++++++++++++++++++++ templates/index.html | 26 ++++++++++ templates/upload.html | 112 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 276 insertions(+) create mode 100644 templates/base.html create mode 100644 templates/files.html create mode 100644 templates/index.html create mode 100644 templates/upload.html diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..5293289 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,40 @@ + + + + + + + {% block title %}Flask NEO Storage{% endblock %} + + + + + +
+ {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
+ {{ message }} + +
+ {% endfor %} + {% endif %} + {% endwith %} + + {% block content %}{% endblock %} +
+ + + + diff --git a/templates/files.html b/templates/files.html new file mode 100644 index 0000000..9c61105 --- /dev/null +++ b/templates/files.html @@ -0,0 +1,98 @@ + + +{% extends "base.html" %} + +{% block title %}Files - Flask NEO Storage{% endblock %} + +{% block content %} +
+

Files di NEO Object Storage

+ Upload File Baru +
+ +{% if files %} +
+ + + + + + + + + + + + + {% for file in files %} + + + + + + + + + {% endfor %} + +
PreviewFilenameSizeModifiedURLActions
+ {% if file.filename.lower().endswith(('.jpg', '.jpeg', '.png', '.gif', '.webp')) %} + Preview + {% else %} + + {% endif %} + {{ file.filename }}{{ "%.2f"|format(file.size / 1024) }} KB{{ file.modified }} + + Buka + + + + +
+
+{% else %} +
+

Belum ada file

+

Belum ada file yang diupload. Upload file pertama sekarang!

+
+{% endif %} + + +{% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..3d5f2ab --- /dev/null +++ b/templates/index.html @@ -0,0 +1,26 @@ + + +{% extends "base.html" %} + +{% block title %}Home - Flask NEO Storage{% endblock %} + +{% block content %} +
+
+
+

NEO Object Storage Demo

+

Demo aplikasi Flask yang terintegrasi dengan BiznetGio NEO Object Storage.

+
+

Aplikasi ini memungkinkan Anda untuk:

+
    +
  • Upload file ke NEO Object Storage
  • +
  • Melihat daftar file yang tersimpan
  • +
  • Menghapus file dari storage
  • +
  • Test koneksi ke NEO
  • +
+ Upload File + Lihat Files +
+
+
+{% endblock %} diff --git a/templates/upload.html b/templates/upload.html new file mode 100644 index 0000000..fe7be94 --- /dev/null +++ b/templates/upload.html @@ -0,0 +1,112 @@ + + +{% extends "base.html" %} + +{% block title %}Upload File - Flask NEO Storage{% endblock %} + +{% block content %} +
+
+
+
+

Upload File ke NEO Object Storage

+
+
+
+
+ + +
Semua jenis file diperbolehkan
+
+ + Lihat Files +
+
+
+ + +
+
+
Upload via AJAX (Advanced)
+
+
+
+
+ + +
+
+ + +
+ +
+ +
+
+
+
+
+ + +{% endblock %}