aboutsummaryrefslogtreecommitdiff
path: root/static/api/images.js
diff options
context:
space:
mode:
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();
+}