aboutsummaryrefslogtreecommitdiff
path: root/static/api/images.js
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2025-11-14 21:55:59 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2025-11-14 21:55:59 +0100
commit3f18f02d07802d1fc705a500e5978a9b3cb2e751 (patch)
tree283970a2f5a693706456b853c550eeaa669b5d72 /static/api/images.js
parent351ad457f0ff95e20301a146b8c88a8f0f659aa1 (diff)
implement login
Diffstat (limited to 'static/api/images.js')
-rw-r--r--static/api/images.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/static/api/images.js b/static/api/images.js
new file mode 100644
index 0000000..915aae6
--- /dev/null
+++ b/static/api/images.js
@@ -0,0 +1,20 @@
+import * as sfw from 'sfw';
+const { Input } = sfw.element.native;
+
+export async function upload_to_timeline() {
+ const input = Input.new({
+ type: 'file',
+ multiple: true,
+ accept: 'image/jpeg',
+ })
+ input.click();
+}
+
+export async function upload_to_profile() {
+ const input = Input.new({
+ type: 'file',
+ multiple: false,
+ accept: 'image/jpeg',
+ })
+ input.click();
+}