summaryrefslogtreecommitdiffstats
path: root/ui/src
diff options
context:
space:
mode:
authorFelix Ableitner <me@nutomic.com>2020-06-08 19:52:32 +0200
committerFelix Ableitner <me@nutomic.com>2020-06-08 19:52:32 +0200
commite583e45d9a2221b3ed2a743cfa172abcd2a1d6a0 (patch)
tree76a2625d41639e125bbc2b1511209645e9997bbb /ui/src
parenta13e9fe3959e07f901ba0647dfd7f749865a900d (diff)
Use pictrs instead of pictshare
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/components/comment-form.tsx4
-rw-r--r--ui/src/components/post-form.tsx6
-rw-r--r--ui/src/components/user.tsx4
3 files changed, 7 insertions, 7 deletions
diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx
index 5239eb2c..7abab752 100644
--- a/ui/src/components/comment-form.tsx
+++ b/ui/src/components/comment-form.tsx
@@ -304,7 +304,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
file = event;
}
- const imageUploadUrl = `/pictshare/api/upload.php`;
+ const imageUploadUrl = `/pictrs/image`;
const formData = new FormData();
formData.append('file', file);
@@ -317,7 +317,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
})
.then(res => res.json())
.then(res => {
- let url = `${window.location.origin}/pictshare/${res.url}`;
+ let url = `${window.location.origin}/pictrs/${res.url}`;
let imageMarkdown =
res.filetype == 'mp4' ? `[vid](${url}/raw)` : `![](${url})`;
let content = i.state.commentForm.content;
diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx
index 6f1e34e0..a9356d05 100644
--- a/ui/src/components/post-form.tsx
+++ b/ui/src/components/post-form.tsx
@@ -518,9 +518,9 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
file = event;
}
- const imageUploadUrl = `/pictshare/api/upload.php`;
+ const imageUploadUrl = `/pictrs/image`;
const formData = new FormData();
- formData.append('file', file);
+ formData.append('images', file);
i.state.imageLoading = true;
i.setState(i.state);
@@ -531,7 +531,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
})
.then(res => res.json())
.then(res => {
- let url = `${window.location.origin}/pictshare/${encodeURI(res.url)}`;
+ let url = `${window.location.origin}/pictrs/${encodeURI(res.url)}`;
if (res.filetype == 'mp4') {
url += '/raw';
}
diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx
index eded9998..c3b12fe0 100644
--- a/ui/src/components/user.tsx
+++ b/ui/src/components/user.tsx
@@ -988,7 +988,7 @@ export class User extends Component<any, UserState> {
handleImageUpload(i: User, event: any) {
event.preventDefault();
let file = event.target.files[0];
- const imageUploadUrl = `/pictshare/api/upload.php`;
+ const imageUploadUrl = `/pictrs/image`;
const formData = new FormData();
formData.append('file', file);
@@ -1001,7 +1001,7 @@ export class User extends Component<any, UserState> {
})
.then(res => res.json())
.then(res => {
- let url = `${window.location.origin}/pictshare/${res.url}`;
+ let url = `${window.location.origin}/pictrs/${res.url}`;
if (res.filetype == 'mp4') {
url += '/raw';
}