upload

Upload a CSV file and read it in Bokeh Web app

自古美人都是妖i 提交于 2019-12-05 01:43:06
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. 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 though a lot of the credit goes to bigreddot's previous answer on creating the widget. I simply extended

Changing file size limit (maxUploadSize) depending on the controller

眉间皱痕 提交于 2019-12-05 01:28:46
I have a Spring MVC web with two different pages that have different forms to upload different files. One of them should have a limitation of 2MB, while the other should have a 50MB limitation. Right now, I have this limitation in my app-config.xml: <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <!-- one of the properties available; the maximum file size in bytes (2097152 B = 2 MB) --> <property name="maxUploadSize" value="2097152 "/> </bean> And I could resolve the maxUploadSize exception in my main controller like that: @Override

PHP - Uploading multiple files

霸气de小男生 提交于 2019-12-05 00:42:13
问题 I'm working on a plugin for wordpress and I want to be able to upload multiple pictures from a form. Right now when I have a form for two pictures and submit it empty, my $_FILES array looks like this: Array ( [image] => Array ( [name] => Array ( [1] => [2] => ) [type] => Array ( [1] => [2] => ) [tmp_name] => Array ( [1] => [2] => ) [error] => Array ( [1] => 4 [2] => 4 ) [size] => Array ( [1] => 0 [2] => 0 ) ) ) Now the problem is that I want to use wordpress' upload handler, wp_handle_upload

Is there any good example of http upload using WinInet c++ library

≡放荡痞女 提交于 2019-12-05 00:22:11
问题 I cannot get my code to work :/ 回答1: Here's a quick example from Microsoft. static TCHAR hdrs[] = _T("Content-Type: application/x-www-form-urlencoded"); static TCHAR frmdata[] = _T("name=John+Doe&userid=hithere&other=P%26Q"); static LPSTR accept[2]={"*/*", NULL}; // for clarity, error-checking has been removed HINTERNET hSession = InternetOpen("MyAgent", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); HINTERNET hConnect = InternetConnect(hSession, _T("ServerNameHere"), INTERNET_DEFAULT_HTTP

Alternative way to hide download link

时光毁灭记忆、已成空白 提交于 2019-12-04 22:05:46
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 way to hide download link? This script will handle the downloading of the file and it includes a

PHP Image size is less than 1mb

纵然是瞬间 提交于 2019-12-04 22:04:23
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:**10514 Also the reason I don't want to set it on a server level because we also want to do videos. We

Upload image with alamofire

时光怂恿深爱的人放手 提交于 2019-12-04 22:02:00
问题 I'm trying to upload an image to server with Alamofire but my code doesn't work. This is my code: var parameters = ["image": "1.jpg"] let image = UIImage(named: "1.jpg") let imageData = UIImagePNGRepresentation(image) let urlRequest = urlRequestWithComponents("http://tranthanhphongcntt.esy.es/task_manager/IOSFileUpload/", parameters: parameters, imageData: imageData) Alamofire.upload(urlRequest.0, data: urlRequest.1) .progress { (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) in

cannot change php upload size limit

我只是一个虾纸丫 提交于 2019-12-04 21:59:38
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 MB , but no upper; And ini_set('upload_max_size','10M'); ini_set('post_max_size','10M'); ini_set('max

Unable to upload large videos to Facebook from iOS app

核能气质少年 提交于 2019-12-04 21:30:39
I am trying to upload large files video files to Facebook, but regardless of the approach taken, the result is always the same. The process uploads between 5-35mb worth of data then times out. This happens on WiFi. I have tried with the Facebook SDK 3.1.1, iOS Social Library (i.e. SLRequest) and AFNetworking. The social library and afnetworking give time out errors, whereas the Facebook SDK just returns a Code 5, Operation Could Not Be Completed, HTML Error 200 but if I watch the network activity via instruments it has the same signature, that being a certain amount of megabytes being uploaded

HTML form file upload to Google Drive and save URL to google sheet

旧巷老猫 提交于 2019-12-04 21:13:29
I'm new to the world of google scripting, and have found some great tutorials on how to either: i Upload a file to Google Drive with HTML form ii Append new rows to a google sheet. Essentially I am trying to to write a basic HTML form that collects a few text fields and file attachment, where the file attachment is uploaded to my google drive and the URL along with the other form text fields are appended a Google Sheet. Here is the HTML form I am working with (based on a tutorial I found): <!-- Include the Google CSS package --> <link rel="stylesheet" href="https://ssl.gstatic.com/docs/script