upload

EPIPE (Broken pipe) while uploading?

坚强是说给别人听的谎言 提交于 2019-12-01 07:46:01
i have a problem in my code but i don't know where is it the E log report 04-08 05:47:46.745: E/Upload Server(20080): Starting : /storage/sdcard1/Music/Piano (my favourites)/11 Tchaikovsky - The Music Lovers.mp3 04-08 05:47:47.136: E/Upload Server(20080): Connection Error : sendto failed: EPIPE (Broken pipe) what is (EPIPE) ? , when i attempt to upload image its upload successfully but any other file E Cat report (Broken pipe) why ! this is my uploading code @Override protected String doInBackground(String... urls) { String upLoadServerUri = "http://test.com/test.php"; String fileName = this

How to create an auto-upload Android picture app?

寵の児 提交于 2019-12-01 07:42:31
问题 I am trying to create an app that automatically uploads a picture to my server . The idea is that a user creates a picture with the native/normal camera and my app gets a notification (catches the event) and uploads the picture (in the background). I found a solution for Windows Phone (see here), but not for Android. How can I do this? - Is this technically even possible (with the given APIs) or is it a special feature just for contracted services ( Facebook or Dropbox do that )? Thank you!

Grabbing image with cURL php

纵饮孤独 提交于 2019-12-01 07:37:52
问题 Trying to save image to my server using cURL. The image appears to download. It shows the correct bytes but when i link image does not work. I then DL to see and nope its a blank image. here is my code... whats the issue with it? $ch = curl_init("'. $image .'"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); $rawdata=curl_exec ($ch); curl_close ($ch); $fp = fopen("$rename.jpg",'w'); fwrite($fp, $rawdata); fclose(

Upload progress bar Java Servlet?

南笙酒味 提交于 2019-12-01 07:06:32
问题 I want to show upload progress bar for my uploads using servlet. I tried Ajax, iFrame technique. The page is not reloading and the file also getting uplaoded. But, progress bar is not coming. Is there any jQuery progress plugin available for java servelts? Thanks!! 回答1: I strongly recommend jQuery Uploadify plugin for ajax file uploads. It comes with a progress bar as well. You can find an example on their demo page. Integration with JSP/Servlet isn't that hard. You can basically keep the

Commons FTPClient hangs after uploading large a file

谁说胖子不能爱 提交于 2019-12-01 06:53:29
问题 I'm using Apache Commons FTPClient 3.1 to do a simple file upload. storefile() works fine for files of smaller sizes (under 100MB), but when I try uploading something greater than 100MB, it would finish uploading but just hang. I've tried entering passive mode like others have suggested, but it doesn't seem to fix the problem. I've tried multiple FTP servers with the same results, so I'm guessing it's not the host. Here's the gist of what I'm doing: ftpClient.connect(...); ftpClient.login(...

YouTube C# API V3, how do you resume an interrupted upload?

我怕爱的太早我们不能终老 提交于 2019-12-01 06:49:11
问题 I can't work out how to resume an interrupted upload in V3 of the C# YouTube API. My existing code uses V1 and works fine but I'm switching to V3. If I call UploadAsync() without changing anything, it starts from the beginning. Using Fiddler, I can see the protocol given here is not followed and the upload restarts. I've tried setting the position within the stream as per V1 but there is no ResumeAsync() method available. The Python example uses NextChunk but the SendNextChunk method is

HTML file input field with limited file types?

一世执手 提交于 2019-12-01 06:39:58
If I have an HTML file input field, is there any way that I can limit it to only allow image uploads? I'm sure this would be possible with Flash or Java, but I'm trying to stay away from them for the time being. I found the "accept" attribute online, but it doesn't seem to be doing anything for me (or I'm using it wrong.). Any help or examples is appreciated. marcgg The best way is to handle that in the backend. Depending on the type of types you want to allow and the backend technology you will find various ways of doing this. You can also do this in javascript but you'll be more limited and

Limit Struts2 file upload max size without uploading the whole file

醉酒当歌 提交于 2019-12-01 06:37:42
I am trying to implement a file upload in JSP/Struts2, and I noted a strange behaviour. I declared my action that way in struts.xml to limit file size to 1MB <action name="massInsert" class="massInsertAction"> <interceptor-ref name="fileUpload"> <param name="allowedTypes"> image/png,image/gif,image/jpeg </param> <param name="maximumSize">1000000</param> </interceptor-ref> <interceptor-ref name="defaultStack"/> <result name="success">/WEB-INF/jsp/massInsert/massInsert.jsp</result> <result name="validationError">/WEB-INF/jsp/massInsert/massInsert.jsp</result> </action> it works pretty well, non

Android : Upload large files using MultipartEntity

本秂侑毒 提交于 2019-12-01 06:26:50
问题 According this answer "Android upload video to remote server using HTTP multipart form data" I do all steps. But I don't know how I code for server side! I mean a PHP simple page that serve my reauest foe upload. And another question is that : YOUR_URL (3rd line of following snippet) must be address of that PHP page? private void uploadVideo(String videoPath) throws ParseException, IOException { HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(YOUR_URL);

Android File Upload Using HTTP PUT

情到浓时终转凉″ 提交于 2019-12-01 06:09:15
问题 I have a web service which requires me to send file data to HTTP url with PUT request. I know how to do that but in Android I don't know it. The API docs gives a sample request. PUT /images/upload/image_title HTTP/1.1 Host: some.domain.com Date: Thu, 17 Jul 2008 14:56:34 GMT X-SE-Client: test-account X-SE-Accept: xml X-SE-Auth: 90a6d325e982f764f86a7e248edf6a660d4ee833 bytes data goes here I have written some code but it gives me error. HttpClient httpclient = new DefaultHttpClient(); HttpPut