upload

Upload a CSV file and read it in Bokeh Web app

大憨熊 提交于 2019-12-06 19:50:46
问题 I have a Bokeh plotting app, and I need to allow the user to upload a CSV file and modify the plots according to the data in it. Is it possible to do this with the available widgets of Bokeh? Thank you very much. 回答1: Although there is no native Bokeh widget for file input. It is quite doable to extend the current tools provided by Bokeh. This answer will try to guide you through the steps of creating a custom widget and modifying the bokeh javascript to read, parse and output the file. First

PHP Image size is less than 1mb

空扰寡人 提交于 2019-12-06 16:26:39
问题 curretly I am using the following to workout if the file size is less than 1MB however as the following code was from 9lession example site it said to check the size for 1mb, but if I times 1024*2 which is what they are doing here it equals not 1mb but 2048kb saying that the size that it uploads is not in kb instead it from my understanding is bits if you're confused so am I. I need a simple way to tell if an image is 1mb size if($size<(1024*1024)) image that i uploaded and its size: **Size:*

Alternative way to hide download link

人走茶凉 提交于 2019-12-06 16:19:31
问题 I'm currently using this code to hide download link but its giving uncompleted download for some users. I don't know why, but too many users report this problem to me. My current code is: file = "../".$realFileName; $fakeFileName= 'Upbaz.ir-'.base64_decode($_GET['ffname']); $fp = fopen($file, 'rb'); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=$fakeFileName"); header("Content-Length: " . filesize($file)); fpassthru($fp); Anyone know other

cannot change php upload size limit

别说谁变了你拦得住时间么 提交于 2019-12-06 15:54:09
问题 I used uplaodify plugin to upload music files. Everyting is okay in my local uploadify.php file is in public_html/uploadify directory i want to increment my upload file size limit to 10 MB i tried to put php.ini file in public_html post_max_size = 500M upload_max_filesize = 500M max_execution_time = 900; max_input_time 900 and I am looking my phpinfo() thats good but ı cannot upload bigger than 2MB And i tried to put same php.ini in public_html/uploadify Now I can upload file which size 2.5

How to upload binary data using POST

谁都会走 提交于 2019-12-06 15:48:36
I have something like this in my code: String boundary = "thisIsMyBoundaryString"; StringBuilder body = new StringBuilder(); ... byte[] data = bos.toByteArray(); body.append(new String(data)); body.append("\r\n--" + boundary + "--\r\n"); String entity = body.toString(); I'm building a POST request and need to insert some binary data (JPEG compressed bitmap). After appending byteArray, I want to append newLine and boundary string, but the StringBuilder gets corrupted - seems that the bytes from the added boundary become misaligned from that point on and they are no longer being interpreted as

Get Error WebPage Access is denied in IE

纵然是瞬间 提交于 2019-12-06 15:44:43
I'm open file dialog with $('#dropbox').click And then pick a file to upload . And then click button upload file in Firefox success file upload but in IE Get Error WebPage Access is denied( line form.submit(); ). $(document).ready(function(){ if((support.fileReader==false)&&(support.formData==false)){ $('input[type=button]').eq(0).attr("onClick",'fileUpload(this.form,"UploadHandler.ashx","upload");returnfalse;'); $('input[type=file]').eq(0).attr("onchange","fileSelectedIE();"); } $('#dropbox').click(function(){ $('input[type=file]').click(); }); }); functionfileUpload(form,action_url,div_id){

codeigniter image upload cant grab file name

℡╲_俬逩灬. 提交于 2019-12-06 15:38:55
i have try and try and i just cant get my image to upload. And i cant grab my image name when i try to echo it out :S. can you see what im doing wrong. here is my controller: <?php //ADMIN PAGE if (! defined('BASEPATH')) exit('No direct script access'); class News extends CI_Controller { //Write post when logged in as admin function write() { //insert image $config['upload_path'] = APPPATH .'/archive/img/news/'; $config['allowed_types'] = 'gif|jpg|jpeg|png'; $config['max_size'] = '9000'; $config['encrypt_name'] = true; $this->load->library('upload', $config); $this->upload->do_upload(

node.js / Youtube API / Upload

本秂侑毒 提交于 2019-12-06 15:01:22
Using the following code I'm tring to upload a video youtube via direct upload . I already have the access token (auth_key). I'm pretty sure I'm sending the post data incorrectly... function upload(auth_key, devKey, callback){ fs.readFile('test.mp4', function(err, movie){ var boundary = randomString(); var xml = '<?xml version="1.0"?>' + '<entry xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007">' + '<media:group>' + '<media:title type="plain">Bad Wedding Toast</media:title>' + '<media:description type="plain">I gave

Empty file after upload with JAVA on my ftp server

一笑奈何 提交于 2019-12-06 14:48:21
I am facing some problem while trying to upload a file on my ftp server with java. here is my code function : public static void upload_files(String un, String pw, String ip, String f){ try { FTPClient client = new FTPClient(); client.connect(ip); client.login(un,pw); InputStream is = new FileInputStream(f); client.storeFile("test2",is); is.close(); } catch(Exception e) { e.printStackTrace(); } } "f" is the path of the file I want to upload (ie "C:\myfile"). No error during the compilation, one file is well sent to the server, but sadly empty (0 byte). I also noticed that it takes quite long

Unsafe JavaScript attempt to access frame, when try to upload file with ajax

放肆的年华 提交于 2019-12-06 14:18:22
问题 My goal is to upload file with ajax-way. I use this javascript library http://valums.com/wp-content/uploads/ajax-upload/demo-jquery.htm There is a link on my page like "Upload" button on example page. When I click it, "Open file" dialog is open. I choose file and form is automatically submitted. This is my javascript code. var upload_btn = $('#upload-opml'); new AjaxUpload(upload_btn.attr('id'), { action: upload_btn.attr('href'), name: 'opml', onComplete: function (file, response) { // } });