summaryrefslogtreecommitdiff
path: root/iridescence/src/api
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-11-07 08:06:57 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-11-07 08:06:57 -0500
commit01de71698b91bc61e61d076f9c25d1cabb039b18 (patch)
tree9f0e460c49034ad3faaafcb27e7fe63cc1a3e23c /iridescence/src/api
parent76ad709e0afed734c4331ddb8de91745a541a67d (diff)
downloadtheglassyladies-01de71698b91bc61e61d076f9c25d1cabb039b18.tar.xz
theglassyladies-01de71698b91bc61e61d076f9c25d1cabb039b18.zip
demo-able photo upload
Diffstat (limited to 'iridescence/src/api')
-rw-r--r--iridescence/src/api/dichroism.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/iridescence/src/api/dichroism.js b/iridescence/src/api/dichroism.js
index 718269a..7821eb3 100644
--- a/iridescence/src/api/dichroism.js
+++ b/iridescence/src/api/dichroism.js
@@ -54,6 +54,18 @@ export default class Dichroism {
];
}
+
+ async uploadPhoto(file) {
+ const fd = new FormData();
+ fd.append(file.name, file);
+
+ return fetch("http://localhost:8000/photos", {
+ method: "POST",
+ body: fd
+ });
+ }
+
+
getProducts() {
return this.products.slice(0);
}