upload

Show the image preview before uploading it to the server

我怕爱的太早我们不能终老 提交于 2019-12-07 15:48:27
问题 Hello I am looking for a Javascript or jQuery based solution to show an image preview of the SELECTED image and not of the uploaded one. So as soon as the user selects the image a preview will be shown of this image. I do not have any code, I am pretty lost here. I need a solution HTML + Javascript or jQuery based. I can also use some PHP if necessary 回答1: To do that, you need to use the HTML5 File API. Almost every latest browsers support this feature except IE9. Safari 5.1 supports this but

linux - watch a directory for new files, then run a script

孤街醉人 提交于 2019-12-07 14:49:25
问题 I want to watch a directory in Ubuntu 14.04, and when a new file is created in this directory, run a script. specifically I have security cameras that upload via FTP captured video when they detect motion. I want to run a script on this FTP server so when new files are created, they get mirrored (uploaded) to a cloud storage service immediately, which is done via a script I've already written. I found iWatch which lets me do this (http://iwatch.sourceforge.net/index.html) - the problem I am

Java - Upload OutputStream as HTTP File Upload

淺唱寂寞╮ 提交于 2019-12-07 14:28:21
问题 I've got a legacy application that writes to an OutputStream , and I'd like to have the contents of this stream uploaded as a file to a Servlet. I've tested the Servlet, which uses commons-fileupload , using JMeter and it works just fine. I would use Apache HttpClient, but it requires a File rather than just an output stream. I can't write a file locally; if there was some in-memory implementation of File perhaps that might work? I've tried using HttpURLConnection (below) but the server

Can the server use a file from a client without uploading it to the server? ASP.NET

只愿长相守 提交于 2019-12-07 14:24:36
问题 I was wondering, at the moment, the client uploads a file to a directory on the server where the server can then use the file (csv file) to update a SQL database. Is that the only way the server can use that file? For it to first be uploaded to the server? Or can you use that file without uploading it to a directory of the server? (using visual studio 2012, C# and asp.net) Code update--- asp Uploading the file. (I know the code can be cleaner an written better, but my testing code is never

You need to authorize access before proceeding

安稳与你 提交于 2019-12-07 13:53:12
问题 i'm trying to upload video on you tube using my application. i'm using google-api-php-client for uploading video <?php // Call set_include_path() as needed to point to your client library. set_include_path("google-api-php-client/src/"); require_once 'Google/autoload.php'; require_once 'Google/Client.php'; require_once 'Google/Service/YouTube.php'; session_start(); /* * You can acquire an OAuth 2.0 client ID and client secret from the * {{ Google Cloud Console }} <{{ https://cloud.google.com

What is the best way to implement a big (1GB or more) file uploader website in PHP or Java?

a 夏天 提交于 2019-12-07 13:49:35
问题 What is the best way to implement a big (1GB or more) file uploader website in PHP or Java? Using the default way of uploading in PHP or Java results in running out of RAM space and slowing the website very dramatically. 回答1: It would be unwise to open the file on the client side, read its whole content to memory, close it and then start sending the contents, precisely because the contents can exceed the available memory. One alternative is to open the file, read a chunk of it (remembering

Unable to test HTTP PUT-based file upload via Squid Proxy

对着背影说爱祢 提交于 2019-12-07 13:35:26
问题 I can upload a file to my Apache web server using Curl just fine: echo "[$(date)] file contents." | curl -T - http://WEB-SERVER/upload/sample.put However, if I put a Squid proxy server in between, then I am not able to: echo "[$(date)] file contents." | curl -x http://SQUID-PROXY:3128 -T - http://WEB-SERVER/upload/sample.put Curl reports the following error: Note: This error response was in HTML format, but I've removed the tags for ease of reading. ERROR: The requested URL could not be

Laravel Call to a member function getClientOriginalExtension() on null

流过昼夜 提交于 2019-12-07 12:39:09
问题 Hello im getting the following error while upload an image using laravel: "Call to a member function getClientOriginalExtension() on null". Here is my controller: $imageName = rand(11111, 99999) . '.' . $request->file('image')->getClientOriginalExtension(); $destinationPath = 'events'; $fileName = rand(11111, 99999) . '.' . $extension; $upload_success = $image->move($destinationPath, $imageName); Here is my view: {!! Form::file('image', null, ['class' => 'form-control']) !!} How do i save the

PHP Codeigniter Uploading Class, rename files with specific schema

孤人 提交于 2019-12-07 12:38:01
问题 I am having a spot of trouble with Codeigniter and getting files to rename within the upload process from the Upload Library it has to offer. Now before anyone says it, I am not looking for "encrypted" file names. My Problem is in uploading images you have a good handful of types you could be dealing with. So how does one change the file name using the file_name config option to a specific schema (which I already have the schema part up and working). But maintain the same file type? Right now

Overcome host's max file size limit for PHP/POST data when uploading files?

南楼画角 提交于 2019-12-07 12:18:38
问题 I'm with a fairly mediocre low-cost (shared) host at the moment (as it's all I can afford just now) and want to implement a very basic file upload feature on a page. I want to allow files of up to 100MB to be uploaded to the server but my free host limits the PHP_MAX_FILESIZE to 32MB and the POST_FILESIZE to 64MB. Is there any way of overcoming this without requiring the user to split the larger files into smaller chunks? Either a JavaScript or Flash-based solution which could perhaps somehow