upload

C# HttpWebRequest form upload

拈花ヽ惹草 提交于 2019-12-07 12:00:50
问题 im trying to automate a file upload from my C# program. This is the method to upload a file. public static string UploadFileEx(string uploadfile, string url, string fileFormName, string contenttype, NameValueCollection querystring, CookieContainer cookies) { if ((fileFormName == null) || (fileFormName.Length == 0)) { fileFormName = "file"; } if ((contenttype == null) || (contenttype.Length == 0)) { contenttype = "application/octet-stream"; } string postdata; postdata = ""; if (querystring !=

Is it possible to upload a Folder using HTML Form / PHP script

雨燕双飞 提交于 2019-12-07 11:34:50
问题 I'm developing a website where multiple images are uploaded to a website and I'm playing around with ways that this can be done. At the moment I have a php script that will get & display images from a given folder which looks like this: <?php $dirname = "content/2014/February/"; $images = glob($dirname."*.*"); foreach($images as $image) { echo '<img src="'.$image.'" /><br />'; } ?> This works fine and I can format the <img> using css and apply jquery for the gallery, BUT, how can I upload the

Laravel 4 get image from url

♀尐吖头ヾ 提交于 2019-12-07 10:39:09
问题 OK so when I want to upload an image. I usually do something like: $file = Input::file('image'); $destinationPath = 'whereEver'; $filename = $file->getClientOriginalName(); $uploadSuccess = Input::file('image')->move($destinationPath, $filename); if( $uploadSuccess ) { // save the url } This works fine when the user uploads the image. But how do I save an image from an URL??? If I try something like: $url = 'http://www.whereEver.com/some/image'; $file = file_get_contents($url); and then:

how do I add files already stored on s3 to carrierwave backed by same datastore?

荒凉一梦 提交于 2019-12-07 10:15:45
问题 I already have files in my s3, which were uploaded via FTP, and I'd just like to attach them to my models, which allow upload via CarrierWave, if I'm using the same bucket to store the files I upload via CarrierWave and the ones I upload via FTP, is there a way to just assign the s3 key for the file to the (new) associated record (via a model) where the file itself is handled via CarrierWave's attachment strategy? 回答1: Assuming you have the thumbnails already created, and can store the files

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()'

断了今生、忘了曾经 提交于 2019-12-07 09:34:12
问题 I am Trying To upload image to server from gallery and camera.When i Choose image from gallery to upload to server its Work Perfactly.But when i Select camera captured Image for upload to server Its Crash And Showing the error. java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference At OnActivityResult. @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super

Rails AJAX upload form with Remotipart

守給你的承諾、 提交于 2019-12-07 08:51:02
问题 I've been bashing my head trying to get an AJAX upload form working. I'm using Rails 3.2. I put gem "remotipart", "~> 1.0" in my Gemfile, ran bundle install and it installed successfully. I previously had this non-ajax upload form, which I added :remote => true to as per the literature on the github page : <%= form_tag "/administration/data_imports", :multipart => true, :remote => true %> <label for="file">Input File</label> <%= file_field_tag "file" %> <button type="submit">Import Data<

IE11 hangs during file upload with AjaxFileUpload

爷,独闯天下 提交于 2019-12-07 08:50:57
问题 Strange problem appeared with IE11 few days ago. The plugin, wich worked good (https://github.com/davgothic/AjaxFileUpload) now doesn't want to. After I choose a file and click "Load" IE deathly hangs. Only kill process helps. I looked into deep jQuery code for posting data and can't find where to put breakpoint before it hangs. The submitting data is ok, file recieved on server and handler correctly worked, it returns the XML with some info. But no more events (such as "ajaxComplete") called

How to upload an existing collection of 3rd-party Jars to a Maven server in Gradle?

坚强是说给别人听的谎言 提交于 2019-12-07 08:25:40
问题 How can I upload a collection of existing Jars to a Maven repository? The Jars are built from an ANT Task imported to Gradle, and used as a dependency to my task... The Jars don't have version tag, so they should ALL receive the same version number when they are uploaded... apply plugin: 'java' apply plugin: 'maven' version = "6.1.1" group = "com.oahu" ant.importBuild "$projectDir/tools/ant/package.xml" uploadArchives(dependsOn: ["oahu-jar", "client-sdk-jar", "common-jar"]) << { // the

How to show uploading progress in CKEditor?

大城市里の小女人 提交于 2019-12-07 08:23:30
I'm adding a plugin that allow user to upload and display video to CKEditor. The file's size may be big so I'd like to display the upload progress. Currently I'm using the default FileBrowser API to show the upload button, but the document doesn't mention about showing the progress. How can I achieve this? Or do I need to write my own upload plugin? You can trigger the event emitter to check if the upload is in progress a sample code for s3 upload using nodejs function s3uploads(filePath, callback){ var localFile = filePath; var onlyFileName = localFile.split("/"); var fname = (onlyFileName

Getting the name & extension of an uploaded file using python (google app engine)

此生再无相见时 提交于 2019-12-07 08:19:32
问题 I am using a form to upload files to the google app engine and store them in the datastore. l would also like to store the original file name and extension for presentation purposes. Is there a way of retrieving this data from the post sever side or can it only be gathered client side and sent as separate fields (e.g. http://www.tinyurl.com/5jybfq)? Many thanks. For those that follow the solution dased on the answer below: this_file = self.request.params["file_upload_form_field_name"]