Search Results

Search found 1359 results on 55 pages for 'uploading'.

Page 20/55 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • ASP.Net: Writing chunks of file..HTTP File upload with resume..

    - by Manish
    Please refer to question: http://stackoverflow.com/questions/2062852/resume-in-upload-file-control Now to find a solution for the above question, I want to work on it and develop a user control which can resume a HTTP File Upload process. For this, I'm going to create a temporary file on server until the upload is complete. Once the uploading is done completely then will just save it to the desired location. The procedure I have thought of is: Create a temporary file with a unique name (may be GUID) on the server. Read a chunk of file and append it to this temp file on the server. Continue step 1 to 3 until EOF is reached. Now if the connection is lost or user clicks on pause button, the writing of file is stopped and the temporary file is not deleted. Clicking on resume again or uploading the same file again will check on the server if the file exists and user whether to resume or to overwrite. (Not sure how to check if it's the same file. Also, how to step sending the chunks from client to server.) Clicking on resume will start from where it is required to be uploaded and will append that to the file on the server. (Again not sure how to do this.) Questions: Are these steps correct to achieve the goal? Or need some modifications? I'm not sure how to implement all these steps. :-( Need ideas, links... Any help appreciated...

    Read the article

  • Why would some $_POST variables go missing for a form with PHP?

    - by Chad Johnson
    Sometimes, multiple times a day in fact, users of my web application are submitting a certain form which has about a dozen form fields, half of which are hidden fields, and half of the $_POST data is simply not present in the processing script. Note that the fields that are not present are at the very bottom of the form. I know this because this raises a fatal error, and an email is dispatched to me which includes the post data. And of course, neither I nor any of the developers on my team can reproduce the problem. Flash is involved in the process, as I'm using a library called Uploadify to display a progress meter. Here is the flow...does anyone have ANY ideas at all why some of the post data would be getting wiped out? User visits edit screen for a page in the CMS I am using. Record id for the page is put into a form as a hidden value. User clicks the Uploadify browse button and selects a file (only single file selection is allowed). User clicks Submit button for my form. jQuery intercepts the form submit action, triggers Uploadify to start uploading, and returns false for the submit action (manually cancelling the form submit event so that Uploadify can take over). Uploadify uploads to a custom process script. Uploadify finishes uploading and triggers the Javascript completion callback. The Javascript callback calls $('#myForm').submit() to submit the form. This happens on multiple browsers (Firefox 3.5, 3.6, Safari, Internet Explorer 7, 8) and multiple platforms (Mac OS 10.5, 10.6 and Windows XP, 7).

    Read the article

  • Status Code from FTPWebRequest GetResponse method

    - by nick
    This is slightly tricky. I am uploading files to FTP asynchronously. After uploading each file I am checking the status of the upload operation for that file. This can be done with StatusCode property of the FtpWebResponse object for that request. The code snippet is as give below. System.IO.FileStream fs = System.IO.File.Open(fileName, System.IO.FileMode.Open); while ((iWork = fs.Read(buf, 0, buf.Length)) > 0) requestStream.Write(buf, 0, iWork); requestStream.Close(); FtpWebResponse wrRet = ((FtpWebResponse)state.Request.GetResponse()); There are about 37 StatusCode values as per msdn. I am unaware as to which of these status code values will assure that the file is uploaded successfully. Some of them I used in my code to check for success are : wrRet.StatusCode == FtpStatusCode.CommandOK wrRet.StatusCode == FtpStatusCode.ClosingData wrRet.StatusCode == FtpStatusCode.ClosingControl wrRet.StatusCode == FtpStatusCode.ConnectionClosed wrRet.StatusCode == FtpStatusCode.FileActionOK wrRet.StatusCode == FtpStatusCode.FileStatus But I am unaware of the rest. I need to be sure about these codes because based on the failure or success of the upload operation I have other dependant operations to be carried out. A wrong condition can affect the remaining code. Another thought that crossed my mind was to simply put the above code into a try..catch and not depend on these status codes. With this I would not be depending on the status codes and assuming that any failure will always be directed to the catch block. Kindly let me know if this is the right way. Thanks in advance.

    Read the article

  • Cannot upload media via Wordpress uploader

    - by Justin Johnson
    This has to do with media uploading in Wordpress. Every time WP creates a folder for new uploads (it organizes uploads by year and month: yyyy/mm), it creates it with the "apache:apache' user and group, with full access to all (777 or drwxrwxrwx). However, after that, WP cannot create a folder within that folder (e.g.: mkdir 2011 succeeds, but mkdir 2011/01 fails). Also, uploads cannot be moved into these newly created folders even though the permissions are 777 (rwxrwxrwx). Once a month, I have to chown the newly created folders to be the same as user:group as the rest of the files. Once I do that, uploading works fine (which doesn't make sense to me The really frustrating part is that this problem doesn't exist in other WP installs on other domains on the same server. * I wasn't sure if this should be here or on serverfault. Edit: The containing directory /.../httpdocs/blog/wp-content/uploads has the correct ownership drwxrwxrwx 5 myuser psaserv 4096 Jun 3 18:38 uploads This is a Plesk/CentOS environment hosted by Media Temple (dv). I've written the following test script to simulate the problem <pre><?php $d = "d" . mt_rand(100, 500); var_dump( get_current_user(), $d, mkdir($d), chmod($d, 0777), mkdir("$d/$d"), chmod("$d/$d", 0777), fileowner($d), getmyuid() ); The script always creates the first directory mkdir($d) successfully. On domain A, where the WP problem is, it cannot create the nested directory mkdir("$d/$d"). However, on domain B, both directories are successfully created. I am running each script at /var/www/vhosts/domainA/httpdocs/tmp/t.php and /var/www/vhosts/domainB/httpdocs/tmp/t.php respectively I checked the permissions on tmp, httpdocs, and domain[AB] and they are the same for each path. The only thing that differs is the user.

    Read the article

  • Issues Deploying ROOT Context in Tomcat6

    - by Josh K
    I'm working on getting an application deployed to the ROOT ("/") context in my Tomcat 6 instance. Here's what has been done: Defined another virtual host (domain.com) Created the respective folder (/etc/tomcat6/Catalina/domain.com) Set it to auto deploy WAR's Set appBase to CATALINA_BASE/domainapps and created respective folder Copied manager.xml from localhost to domain.com. Now I'm trying to deploy into the ROOT context by uploading a ROOT.war to CATALINA_BASE/domainapps. This isn't working. I don't get any exceptions thrown, but the stock ROOT page ("It works !") stays up. I have successfully deployed it into another context (by uploading domainapp.war and viewing at /domainapp), but not ROOT. Re-reading the Virtual Host setup it makes reference to CATALINA_HOME and CATALINA_BASE. My CATALINA_HOME is at /usr/share/tomcat6/domainapp while CATALINA_BASE is /var/lib/tomcat6. Which should I be using for what? Currently haven't touched CATALINA_HOME but will try messing with a few things there. A better question might be what is the generally accepted flow taken to setup a new Tomcat instance and deploy an application to the root context.

    Read the article

  • ASP.net file operations delay

    - by mtranda
    Ok, so here's the problem: I'm reading the stream from a FileUpload control, reading in chunks of n bytes and writing the array in a loop until I reach the stream's end. Now the reason I do this is because I need to check several things while the upload is still going on (rather than doing a Save(); which does the whole thing in one go). Here's the problem: when doing this from the local machine, I can see the file just fine as it's uploading and its size increases (had to add a Sleep(); clause in the loop to actually get to see the file being written). However, when I upload the file from a remote machine, I don't get to see it until the the file has completed uploading. Also, I've added another call to write the progress to a text file as the progress is going on, and I get the same thing. Local: the file updates as the upload goes on, remote: the token file only appears after the upload's done (which is somewhat useless since I need it while the upload's still happening). Is there some sort of security setting in (or ASP.net) that maybe saves files in a temporary location for remote machines as opposed to the local machine and then moves them to the specified destination? I would liken this with ASP.net displaying error messages when browsing from the local machine (even on the public hostname) as opposed to the generic compilation error page/generic exception page that is shown when browsing from a remote machine (and customErrors are not off) Any clues on this? Thanks in advance.

    Read the article

  • simple image upload in aspnet mvc

    - by FosterZ
    hi,i'm building a simple school portal, i have stucked at uploading an image into my application, i.e a user should upload school image to my server, i have directory for images as ./Content/Images -- all uploading images should be uploaded to this directory. i have following code input type="file" id="SchoolImageUrl" name="SchoolImageUrl" class="required" using this m'getting a browse button, i have no idea how to upload that image to server and how would be my action controller ? i have following controller for creating school public ActionResult SchoolCreate(_ASI_School schoolToCreate, FormCollection collection) { if (!ModelState.IsValid) return View(); try { // TODO: Add insert logic here schoolToCreate.SchoolId = Guid.NewGuid().ToString(); schoolToCreate.UserId = new Guid(Request.Form["currentUser"]); schoolToCreate.SchoolAddedBy = User.Identity.Name; HttpPostedFileBase file = Request.Files["SchoolImageUrl"]; file.SaveAs(file.FileName); //schoolToCreate.SchoolImageUrl = Reuseable.ImageUpload(Request.Files["SchoolImageUrl"], Server.MapPath("../Content")); //schoolToCreate.SchoolImageUrl = Path.GetFullPath(Request.Files[0].FileName); schoolToCreate.SchoolImageUrl = collection["SchoolImageUrl"]; UpdateModel(schoolToCreate); _schoolRepository.CreateSchool(schoolToCreate); //_schoolRepository.SaveToDb(); return RedirectToAction("DepartmentCreate", "Department", new { userId = schoolToCreate.UserId, schoolId = schoolToCreate.SchoolId }); } catch { return View("CreationFailed"); } } here im geting object referece error

    Read the article

  • Upload using python script takes very long on one laptop as compared to another

    - by Engr Am
    I have a python 2.7 code which uses STORBINARY function for uploading files to an ftp server and RETRBINARY for downloading from this server. However, the issue is the upload is taking a very long time on three laptops from different brands as compared to a Dell laptop. The strange part is when I manually upload any file, it takes the same time on all the systems. The manual upload rate and upload rate with the python script is the same on the Dell Laptop. However, on every other brand of laptop (I have tried with IBM, Toshiba, Fujitsu-Siemens) the python script has a very low upload rate than the manual attempt. Also, on all these other laptops, the upload rate using the python script is the same (1Mbit/s) while the manual upload rate is approx. 8 Mbit/s. I have tried to vary the filesize for the upload to no avail. TCP Optimizer improved the download rate on all the systems but had no effect on the upload rate. Download rate using this script on all the systems is fine and same as the manual download rate. I have checked the server and it has more than 90% free space. The network connection is the same for all the laptops, and I try uploading only with one laptop at a time. All the laptops have almost the same system configurations, same operating system and approximately the same free drive space. If anything the Dell laptop is a little less in terms of processing power and RAM than 2 of the others, but I suppose this has no effect as I have checked many times to see how much was the CPU usage and network usage during these uploads and downloads, and I am sure that no other virus or program has been eating up my bandwidth. Here is the code ('ftp' and 'file_path' are inputs to the function): path,filename=os.path.split(file_path) filesize=os.path.getsize(file_path) deffilesize=(filesize/1024)/1024 f = open(file_path, "rb") upstart = time.clock() print ftp.storbinary("STOR "+filename, f) upende = time.clock()-upstart outname="Upload " f.close() return upende, deffilesize, outname

    Read the article

  • I am unable to upload file to my local host folder in php.

    - by Nauman khan
    Hi, I have the follwing code <form enctype="multipart/form-data" action="upload.php" method="POST"> Please choose a file: <input name="uploaded" type="file" /><br /> <input type="submit" value="Upload" /> </form> <?php $target = "upload/"; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else { echo "Sorry, there was a problem uploading your file."; } ?> my page is in http://localhost/nausal/upload.php now I am having the follwing error though i have created a folder in site with name upload. Notice: Undefined index: uploaded in C:\wamp\www\Nausal\upload.php on line 15 Notice: Undefined index: uploaded in C:\wamp\www\Nausal\upload.php on line 17 Sorry, there was a problem uploading your file. Please help me I am very new to php. :(

    Read the article

  • Browser download file prompt using javascript

    - by aix
    hi, I was wondering if there was any method to implement browser's download file prompt using javascript. My reason - well users will be uploading files to a local fileserver which cannot be accessed from the webserver. In other words, both will be on different domains! e.g. let’s say websites hosted on www.xyz.com, but files would reside on local file server with address like \10.10.10.01\Files\file.txt. How am I uploading/transferring file to local fileserver... using ACTIVEX(yikes) & VBscript!!!! (don’t ask :-) so i am storing local file path in my database and binding that data to a grid. So when the user clicks on that link, the file opens in a window (using javascript). Problem is certain file types like text, jpg, pdf, etc open inside browser window. How would i be able to implement content-type or content-disposition using client side scripting? Is that even possible? hoping my description was clear. Any ideas? EDIT: the local file server has a window's shared folder on which the files are saved.

    Read the article

  • waiting for a signal

    - by Umesha MS
    Hi, I am working on an application which uploads the content of the file to server. To upload the file to server I am using ‘QNetworkAccessManager’ class. Since it works as asynchronous way, I changed it to work as synchronous way by using QEventLoop. Class FileTransfer { Public : QNetworkAccessManager mNetworkManager; Void Upload(QNetworkRequest request, QIODevice *data) { responce = mNetworkManager.put(request, data); EventLoop.exec(); ReadResponce(responce); } Void Stop() { responce ->close(); } } In my sample application I have 2 windows. 1st to select the files and 2nd to show the progress. When user click on upload button in the first window, the 2nd window will be displayed and then I create the FileTransfer object and start uploading. While uploading the file if user closes the form then in the destructor of the window I call the stop of ‘FileTransfer’ after that I delete the ‘FileTransfer’ object. But here the Upload() function is not yet completed so it will crash. Please help me to: How to wait in 'stop()' function until the Upload() function is completed

    Read the article

  • Upload file onto Server from the IPhone using ASIHTTPRequest

    - by Nick
    I've been trying to upload a file (login.zip) using the ASIHTTPRequest libraries from the IPhone onto the inbuilt Apache Server in Mac OS X Snow Leopard. My code is: NSString *urlAddress = [[[NSString alloc] initWithString:self.uploadField.text]autorelease]; NSURL *url = [NSURL URLWithString:urlAddress]; ASIFormDataRequest *request; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:@"login.zip"]; NSData *data = [[[NSData alloc] initWithContentsOfFile:dataPath] autorelease]; request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease]; [request setPostValue:@"login.zip" forKey:@"file"]; [request setData:data forKey:@"file"]; [request setUploadProgressDelegate:uploadProgress]; [request setShowAccurateProgress:YES]; [request setDelegate:self]; [request startAsynchronous]; The php code is : <?php $target = "upload/"; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else { echo "Sorry, there was a problem uploading your file."; } ?> I don't quite understand why the file is not uploading. If anyone could help me. I've stuck on this for 5 days straight. Thanks in advance Nik

    Read the article

  • How would I go about letting a user add and associate a comma separated list of categories while add

    - by Throlkim
    I've been struggling for quite a while to get this feature working: I want my user to be able to select categories when uploading a photograph, but additionally be able to specify a comma-separated list of categories to create/find and associate with the photograph. I've had this working by using an attr_accessor :new_categories on the photographs model, but having that there without the column existing breaks both Paperclip and Exifr. Obviously, image upload and EXIF data retrieval are pretty important for a photography website, but not being able to add categories while uploading a photograph is a pain in the arse. Methods I've tried so far: Using attr_accessor to add a field for new_categories. Breaks gems. Using an Ajax sub-form to add categories. Formtastic can't handle it. Adding a column for new_categories to the photograph model. It works, but it's horrific. I haven't tried using a nested form, but I'd need to intercept it and stop it from processing it as normal. Here's an example of what I'm trying to accomplish: http://imgur.com/rD0PC.png And the function I use to associate the categories: def process_new_categories unless self.new_categories.nil? for title in self.new_categories.split(",") self.categories << Category.find_or_create_by_title(title.strip.capitalize) end end end Has anyone got any ideas as to how to do this?

    Read the article

  • $_FILES is null, $_POST is not null

    - by Cory Dee
    When I am going to upload a file, my $_POST variable knows the file name, but the $_FILES variable is null. I've used this code before, so I'm really stumped. Here's what I'm using for input: <label for="importFile">Attach Resume:</label> <input type="hidden" name="MAX_FILE_SIZE" value="10000000"> <input type="file" name="importFile" id="importFile" class="validate['required']"> And for processing: $uploaddir = "E:/Sites/OPL/2008/assets/apps/newjobs/resumes/"; $uploadfile = $uploaddir . time() . '-' . urlencode(basename($_FILES['importFile']['name'])); if (!move_uploaded_file($_FILES['importFile']['tmp_name'], $uploadfile)) { echo 'Error uploading file. Error number: ' . $_FILES['importFile']['error']; var_dump($_FILES['importFile']); echo $_POST['importFile']; die(); } Which is giving me this result: Error uploading file. Error number: NULL Maintaining The OPL Website.doc Any help would be greatly appreciated.

    Read the article

  • how to read uploaded files from xampp

    - by user225269
    I have this code for uploading files on the server: <tr> <td> <form enctype="multipart/form-data" action="uploadaction.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> </td> </tr> <tr> <td> Select the image: <input name="uploadedfile" type="file" /> </td> <tr> <td> <input type="submit" value="Upload File" /> </form> </td> </tr> And here's the action form: <?php $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } ?> What php function will I use? Can you give me an example on how to read the file back and display it in the browser? Please help, thanks.

    Read the article

  • Framework/service for hosting and managing files

    - by Peteris Caune
    Hi, in a webapp I'm building there is a planned side feature of supporting product illustrations and manuals (so pictures and PDFs), possibly arranged in galleries. As I'd rather not implement from scratch all of the uploading, managing and serving of this content, I'm looking for existing solutions which I could integrate. For example, I'm considering Flickr--users of webapp specify their Flickr username and then use some naming convention to link objects in my webapp with pictures uploaded in their Flickr account. Very little code to write from my side, maybe just some API calls that proxy Flickr APIs, since Flickr would handle picture uploading, organizing them in sets, storing them in cloud and serving them in various sizes etc. One drawback here is that either all of the the pictures are public or I have to deal with interactive Flickr authorization. Also not sure if Flickr would be happy being used in such manner. What other online services or libraries/frameworks I should look at? My webapp is written in Python/Pylons, so Python libraries would be preferred. I'm already using some of Amazon infrastructure, so frontends to Amazon S3 would be cool. For online services, RESTful API would be nice.

    Read the article

  • wp+sql+image not goin in the folder

    - by happy
    this is my code for uploading image in database but image are going to the desird forlder...but when i m tryin to retrieve the images to diaplay,,they are not displayed..anyone help me...... $category=$_POST['category']; $uploadDir = 'D:/xampp/htdocs/js/wordpress/wp-content/plugins/img/imagess/ '; $fileName = $_FILES['Photo']['name']; $tmpName = $_FILES['Photo']['tmp_name']; $fileSize = $_FILES['Photo']['size']; $fileType = $_FILES['Photo']['type']; $filePath = $uploadDir . $fileName; $result = move_uploaded_file($tmpName,$filePath); if (!$result) { echo "Error uploading file"; exit; } if(!get_magic_quotes_gpc()) { $fileName = addslashes($fileName); $filePath = addslashes($filePath); } global $wpdb; //$insert=$wpdb->insert('images',array('image_name'=>$filePath,'cat_name'=>$category),array('%b','%s')); $insert=$wpdb->insert('images',array('image_name'=>$filePath,'cat_name'=>$category)); $wpdb->insert('categories',array('cat_name'=>$category)); echo "Successfully Submitted";

    Read the article

  • My -tpl file won't update!

    - by Kyle Sevenoaks
    Hi, I am running the site at www.euroworker.no, it's a linux server and the site has a backend editor. It's a smarty/php site, and when I try to update a few of the .tpl's (two or three) they don't update. I have tried uploading through FTP and that doesn't work either. I have no knowledge of how servers work or anything, please help? It runs on the livecart system. Thanks!

    Read the article

  • My -tpl file won't update!

    - by Kyle Sevenoaks
    Hi, I am running the site at www.euroworker.no, it's a linux server and the site has a backend editor. It's a smarty/php site, and when I try to update a few of the .tpl's (two or three) they don't update. I have tried uploading through FTP and that doesn't work either. I have no knowledge of how servers work or anything, please help? It runs on the livecart system. Thanks!

    Read the article

  • How do I set up ZScreen to upload images to my mediawiki?

    - by Johan
    I've set up a mediawiki with all the correct settings and enabled image uploading. When I do this manually this all works OK. I want to be able to upload screenshots automatically into my mediawiki using ZScreen. There is an option to do this: I press Test..., this work OK, however I'm unable to tell ZScreen to to actually get the picture into my mediawiki. There's no option to select mediawiki as my destination. How do I setup zscreen to upload to my mediawiki?

    Read the article

  • implementation of you tube api using Gdata objective-c client

    - by Samrudh
    Currently,I am developing an app in which i implement You Tube API for uploading videos to you tube from app. I implement API using Gdata objective-c client example youtubetest.xcodeproj. but when i upload video i am getting following error: Error Domain=com.goggle.GdataServiceeDomain code=400 "The Operation couldn't" completed.(GData error invalidRequestUri:"invalid request URL")" I try to solve this issue but can't succeeded.How can i solve this? Thanks in advance.

    Read the article

  • Tool to sync bookmarks between devices in the local network

    - by Daps0l
    I'm looking for a tool to sync my bookmarks locally, without uploading them to any website (like xmarks does.) Example: i currently use 1Password to sync my logins/passwords. They are not uploaded to any website. The program simply syncs between devices (Mac OSX, iPad, Windows) on the local network, without the need of any remote server/database. Now i'm looking for a tool that does (kind of) the same thing, for bookmarks.

    Read the article

  • blogging without having to manually upload pictures

    - by bguiz
    Hi, I want to blog on a Wordpress account, without having to upload pictures manually. I'm looking for a program that allows you to edit text + simple formatting + pictures, and lets you publish it to your blog in one step, taking care of uploading both the text and the pictures. Does anyone know of such a program? Thanks.

    Read the article

  • How many simultaneous requests can be handled by a medium class server on the average?

    - by Motivated Student
    I have bought a PRIMERGY TX100 S1 Server with a trial version of Windows Server 2008 R2 Web Edition. My internet connection with a static IP is very very fast (about 50 mega bit per second) for both downloading and uploading. My site serves text based contents only, no streaming. How many simultaneous requests can be handled by a medium class server on the average? Can it handle at least 1000 simultaneous requests?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >