From 84ce2c6ce0eb1b4f2f32c4ae0d7e08f3571f5018 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 14 Aug 2013 17:06:07 +0200 Subject: Provide json output for api functions Signed-off-by: Florian Pritz --- application/views/file/deleted.php | 9 +++------ application/views/file/too_big.php | 3 --- application/views/file/upload_error.php | 6 ------ application/views/file_plaintext/too_big.php | 2 -- application/views/file_plaintext/upload_error.php | 2 -- 5 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 application/views/file/too_big.php delete mode 100644 application/views/file/upload_error.php delete mode 100644 application/views/file_plaintext/too_big.php delete mode 100644 application/views/file_plaintext/upload_error.php (limited to 'application/views') diff --git a/application/views/file/deleted.php b/application/views/file/deleted.php index ef02398d9..8a5818f2d 100644 --- a/application/views/file/deleted.php +++ b/application/views/file/deleted.php @@ -1,12 +1,9 @@
"; - echo implode("
\n", $errors); - echo "

"; - } ?> - "; - echo implode("
\n", $msgs); + foreach ($errors as $error) { + echo "${error["id"]}: ${error["reason"]}
\n"; + } echo "

"; } ?> diff --git a/application/views/file/too_big.php b/application/views/file/too_big.php deleted file mode 100644 index 5b970a4c8..000000000 --- a/application/views/file/too_big.php +++ /dev/null @@ -1,3 +0,0 @@ -
-

Sorry, the file you uploaded is too big.

-
diff --git a/application/views/file/upload_error.php b/application/views/file/upload_error.php deleted file mode 100644 index 83968eec2..000000000 --- a/application/views/file/upload_error.php +++ /dev/null @@ -1,6 +0,0 @@ -
-

- An error occurred while uploading.
- -

-
diff --git a/application/views/file_plaintext/too_big.php b/application/views/file_plaintext/too_big.php deleted file mode 100644 index d27a0295c..000000000 --- a/application/views/file_plaintext/too_big.php +++ /dev/null @@ -1,2 +0,0 @@ -Sorry, the file you uploaded is too big. - diff --git a/application/views/file_plaintext/upload_error.php b/application/views/file_plaintext/upload_error.php deleted file mode 100644 index c86c56911..000000000 --- a/application/views/file_plaintext/upload_error.php +++ /dev/null @@ -1,2 +0,0 @@ -An error occurred while uploading. - -- cgit v1.2.3-24-g4f1b From 285262b6c668b4f367f8222880ceb01be39fd3ac Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 29 Aug 2013 17:55:52 +0200 Subject: Add CSRF protection Signed-off-by: Florian Pritz --- application/views/file/client.php | 4 ++-- application/views/file_plaintext/client.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'application/views') diff --git a/application/views/file/client.php b/application/views/file/client.php index 5e141f141..29e254a80 100644 --- a/application/views/file/client.php +++ b/application/views/file/client.php @@ -42,7 +42,7 @@ machine login my_username password my_secret_password

Shell

-curl -n -F "file=@/home/user/foo"    (binary safe)
-cat file | curl -n -F "file=@-;filename=stdin"    (binary safe)
+curl -n -F "file=@/home/user/foo"    (binary safe)
+cat file | curl -n -F "file=@-;filename=stdin"    (binary safe)
 
diff --git a/application/views/file_plaintext/client.php b/application/views/file_plaintext/client.php index b37fd81bd..0ab556df2 100644 --- a/application/views/file_plaintext/client.php +++ b/application/views/file_plaintext/client.php @@ -1,6 +1,6 @@ Shell (binary safe): - curl -n -F "file=@/home/user/foo" - cat file | curl -n -F "file=@-;filename=stdin" + curl -n -F "file=@/home/user/foo" + cat file | curl -n -F "file=@-;filename=stdin" Client: Development (git): http://git.server-speed.net/users/flo/fb -- cgit v1.2.3-24-g4f1b From 69e0cba93445496e7b045b54ecefe8243276fd50 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 1 Sep 2013 22:51:28 +0200 Subject: Autofocus username text box on upload_form Signed-off-by: Florian Pritz --- application/views/file/upload_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/views') diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php index 841ac3746..21a2cc4e6 100644 --- a/application/views/file/upload_form.php +++ b/application/views/file/upload_form.php @@ -46,7 +46,7 @@ - + -- cgit v1.2.3-24-g4f1b