upload

jQuery File Upload by bluimp, how to replace instead of renaming

筅森魡賤 提交于 2019-12-05 06:17:28
First of all the jQuery plugin can be found here: https://github.com/blueimp/jQuery-File-Upload I'm using the PHP-version of the script and I'm trying to replace images that has the same name instead of renaming them. I think I've found the functions that do the renaming, but the edits I tried do not work. protected function upcount_name_callback($matches) { $index = isset($matches[1]) ? intval($matches[1]) + 1 : 1; $ext = isset($matches[2]) ? $matches[2] : ''; return ' ('.$index.')'.$ext; } protected function upcount_name($name) { return preg_replace_callback( '/(?:(?: \(([\d]+)\))?(\.[^.]+))

C#: Upload Photo To Twitter From Unity

自作多情 提交于 2019-12-05 06:16:28
问题 currently I am working with unity. In this project, I need to post some status with image to twitter. However, I got a problem to upload the image to the Twitter. Here is the code, which I used to upload the Image: private const string UploadMediaURL = "https://upload.twitter.com/1.1/media/upload.json"; public static IEnumerator UploadMedia(string consumerKey, string consumerSecret, string filePath, AccessTokenResponse response){ Dictionary<string, string> mediaParameters = new Dictionary

Implementing jquery upload plugin 'uploadify' with codeigniter

家住魔仙堡 提交于 2019-12-05 06:14:49
问题 How can i implement this in codeigniter?Uploadify(Jquery) I mean what will be the controller? Hows the progress tracked? And what will happen if flashplayer is not installed by the user? And How do i check progess? Have any one tried this with codeigniter? 回答1: I have successfully implemented uploadify in codeigniter as follows: In the header view : <script type="text/javascript" src="<?php echo base_url()?>resources/js/jquery.js"></script> <link rel="stylesheet" type="text/css" media="all"

Uploadify not uploading file, but indicates success

核能气质少年 提交于 2019-12-05 06:13:37
I have found some posts with the same problem I have, however, no solutions presented. I am not 100% sure what to make of this, but hope you can help. I am attempting to use Uploadify to upload files, but the following happens: Browse for file successful (hence my 'script' and 'uploaded' attributes are correct) Progress bar says "100%" and completes. onComplete fires saying upload successful (according to the path alerted, 'folder' attribute is correct.) If I die my script before any output, the #3 step does not happen - hence it reaches the 'script' specified. After output, the script doesn't

Stream FTP upload in chunks with PHP?

六月ゝ 毕业季﹏ 提交于 2019-12-05 06:10:29
问题 Is it possible to stream an FTP upload with PHP? I have files I need to upload to another server, and I can only access that server through FTP. Unfortunately, I can't up the timeout time on this server. Is it at all possible to do this? Basically, if there is a way to write part of a file, and then append the next part (and repeat) instead of uploading the whole thing at once, that'd save me. However, my Googling hasn't provided me with an answer. Is this achievable? 回答1: OK then... This

PHP sending mail attachments

北战南征 提交于 2019-12-05 06:09:21
问题 I found the post about adding attachments to the mail. The question is how to connect uploaded file with that function? What I have to pass? UPD: echo '<pre>'; print_r($_FILES); echo '</pre>'; $uploads_dir = '/uploads'; // It has need rights $tmp_name = $_FILES["vac_file"]["tmp_name"]; $res = is_uploaded_file($tmp_name); // This is true $name = $_FILES["vac_file"]["name"]; move_uploaded_file($tmp_name, "$uploads_dir/$name"); echo '$tmp_name: '. $tmp_name . '; $name: ' . $name; → Array ( [vac

ANGULAR 4 Base64 Upload Component

我的未来我决定 提交于 2019-12-05 05:55:47
I am new to Angular. I am using Angular 4. Where there is a requirement to send the base64 Image as one of the model member to the web api. Is there a Angular component or directive for the that would bind the base64 to the said model? Appreciate and Thank you for the help. You can upload image and store it as base64 encoded. In your template add this <div class="image-upload"> <img [src]="imageSrc" style="max-width:300px;max-height:300px"/> <input name="imageUrl" type="file" accept="image/*" (change)="handleInputChange($event)" /> </div> And this will handle your upload mechanism from

How to upload files over 2Gb to IIS 7.5 / .Net 4?

独自空忆成欢 提交于 2019-12-05 05:21:29
As far as I know IIS and ASP.NET has a limitation of 2Gb files upload. Are there any solutions for this in IIS 7.5 and .Net 4? I found a blog post that explains the cryptic error "ASP.NET detected invalid characters in the URL." From the blog post: When the integrated pipeline is used, we go though webengine code (webengine4!MgdGetRequestBasics) which doesn't support more than 2 GB content-length and a System.ArithmeticException exception is raised which subsequently cause the HTTP 400 error. With the classic pipeline, we don't use webengine4 but the old ASPNET_ISAPI model and we don't hit the

Progress bar for HttpClient uploading

旧时模样 提交于 2019-12-05 05:17:35
I want to run asynchronous uploads with a progress bar in WPF (and preferably use PCL for code reuse in Xamarin and SL too.) I've been trying to use System.Net.HttpClient. Unfortunately, PutAsync doesn't provide any progress notifications. (I know that it does for Windows.Web.Http.HttpClient, but that's not available for WPF, nor in the PCL). For downloading, its fairly easy to implement your own progress bar, as described here . You just pass the ResponseHeadersRead option, which makes the stream available as soon as the headers are returned, and then you read it in chunk by chunk,

Resume HTTP Post/upload with Indy

我们两清 提交于 2019-12-05 04:52:10
问题 I'm trying to resume an upload using indy (HTTP Post), the code looks like this (using Delphi 2010, Indy 10.4736): IdHttp.Head('http://localhost/_tests/resume/large-file.bin'); ByteRange := IdHttp.Response.ContentLength + 1; // Attach the file to post/upload Stream := TIdMultipartFormDataStream.Create; with Stream.AddFile('upload_file', 'D:\large-file.bin', 'application/octet-stream') do begin HeaderCharset := 'utf-8'; HeaderEncoding := '8'; end; // with with IdHTTP do begin IOHandler