summaryrefslogtreecommitdiffstats
path: root/data/js
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-12-17 12:35:15 +0100
committerFlorian Pritz <bluewind@xinu.at>2011-12-17 12:35:15 +0100
commitfa869698c592c9d7d0f33b64c8fba409ebf5d75f (patch)
treea835e0dd8d59aada4d6fb026b432e082984f3ec0 /data/js
parent94aef7b4e9283f5c955cd2c4d5f71937be87b048 (diff)
remove php code from upload_from.js
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'data/js')
-rw-r--r--data/js/upload_form.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/data/js/upload_form.js b/data/js/upload_form.js
index 0dcb53708..598d86465 100644
--- a/data/js/upload_form.js
+++ b/data/js/upload_form.js
@@ -2,7 +2,7 @@
if (window.File && window.FileList) {
function checkFileUpload(evt) {
var f = evt.target.files[0];
- if (f.size > <?php echo $max_upload_size; ?>) {
+ if (f.size > max_upload_size) {
document.getElementById('upload_button').value = "File too big";
document.getElementById('upload_button').disabled = true;
} else {
@@ -40,7 +40,6 @@ function gen_boundary() {
}
function do_paste() {
var http = new XMLHttpRequest();
- var url = "<?php echo site_url("file/do_upload/dumb"); ?>";
var CRLF = "\r\n";
var boundary = "--" + gen_boundary();
var body = "--" + boundary + CRLF
@@ -49,7 +48,7 @@ function do_paste() {
+ CRLF
+ document.getElementById("textarea").value + CRLF
+ "--" + boundary + "--" + CRLF + CRLF;
- http.open("POST", url, true);
+ http.open("POST", upload_url, true);
//Send the proper header information along with the request
http.setRequestHeader("Content-type", "multipart/form-data; boundary=" + boundary);