upload

Simple “PUT” file upload with AFNetworking

北城余情 提交于 2019-12-23 04:54:28
问题 I suppose it is pretty simple but I couldn't figure out how to do it. I want to upload a file to using a PUT request to a webservice using AFNetworking library. This is the curl command I used to test the service mac:~ user$ curl --verbose -T image.jpeg http://server.org:8001/social/test.jpg * About to connect() to server.org port 8001 (#0) * Trying 123.45.123.123... * connected * Connected to server.org (123.45.123.123) port 8001 (#0) > PUT /social/test.jpg HTTP/1.1 > User-Agent: curl/7.24.0

PHP: Rename file before upload

夙愿已清 提交于 2019-12-23 04:36:06
问题 I'm trying to rename each file before uploading to Amazon S3. I am trying to use this exact method of which was answered by @Silvertiger: PHP - upload and overwrite a file (or upload and rename it)? If exists, rename to a random name although somehow it doesn't work. Here is the upload post Parameter from the Amazon S3 Class: public static function getHttpUploadPostParams($bucket, $uriPrefix = '', $acl = self::ACL_PRIVATE, $lifetime = 3600, $maxFileSize = 5242880, $successRedirect = "201",

Can Oracle SQL*Loader process XML?

☆樱花仙子☆ 提交于 2019-12-23 04:14:08
问题 Does Oracle offer a standardized upload of XML formatted files? I thought that the canonical format that is used for XML output, structure = ROWSET/ROW/columname , could be uploaded back into the table again, by just running sqlldr with appropriate control file contents. But I cannot find anything about this anywhere on the web, and error messages after trials seem to indicate that it is only possible to upload XML into XML-type formatted tables, where I just want to upload data in a plain

PHP uploading file from browser to FTP

前提是你 提交于 2019-12-23 04:08:12
问题 I want to upload files from user's machine to folder uploads in my FTP and it doesn't work. Can you help me? $ftp_server = "some ip"; $ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server"); $login = ftp_login($ftp_conn, "some name", "some password"); $target_dir = "uploads/"; $target_file = basename($_FILES["filename"]["name"]); if (ftp_fput($ftp_conn, $target_dir.$target_file, FTP_ASCII)) { echo "Successfully uploaded $target_file."; } else { echo "Error uploading

codeigniter image upload cant grab file name

▼魔方 西西 提交于 2019-12-23 03:32:42
问题 i have try and try and i just cant get my image to upload. And i cant grab my image name when i try to echo it out :S. can you see what im doing wrong. here is my controller: <?php //ADMIN PAGE if (! defined('BASEPATH')) exit('No direct script access'); class News extends CI_Controller { //Write post when logged in as admin function write() { //insert image $config['upload_path'] = APPPATH .'/archive/img/news/'; $config['allowed_types'] = 'gif|jpg|jpeg|png'; $config['max_size'] = '9000';

how to upload doc and docx in php?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 03:27:08
问题 Am trying to upload document and docx in php through html input but am unable to upload doc and docx even i mentioned the mime type correctly.please help me out to upload doc and docx.i wrote my code above..thanks in advance.. <?php $allowedExts = array(".doc", ".docx", "pdf", "gif", "jpeg", "jpg", "png"); $extension = end(explode(".", $_FILES["file"]["name"])); if (($_FILES["file"]["type"] == "application/pdf") || ($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image

Phonegap Filetransfer Upload image to Webservice

有些话、适合烂在心里 提交于 2019-12-23 03:26:31
问题 I need to upload an image to a webservice using phonegaps Camera and File Transfer API. So for example, on the Webservice have : [WebMethod] [ScriptMethod(UseHttpGet = true)] public string SaveImage(string imageData, string filename) { string success = "Nothing"; try { string filename = "text.png"; if (!System.IO.Directory.Exists(HttpContext.Current.Server.MapPath("~/devimg"))) { System.IO.Directory.CreateDirectory(HttpContext.Current.Server.MapPath("~/devimg/")); } string path = HttpContext

Insert image into Primefaces editor

房东的猫 提交于 2019-12-23 03:12:10
问题 I'm using JSF2.2, Tomcat 8 and MySQL DB to create a simple CMS. In my back pages I use Primefaces p:editor to create/edit my page content. I would like to insert an image somewhere into the text. It would be great if I could upload the image and insert it at the current cursor position. Ideally, the image should be saved as a blob, but if it's easier for the implementation it could instead be stored as a local file. I can see that p:editor already has an option to insert a URL of an image,

exposing files from a service through a rails application

我怕爱的太早我们不能终老 提交于 2019-12-23 03:01:39
问题 I have a rails application that generates open office files, and I have a service at another location that will convert these open office files to microsoft office files. I'd like to have a controller action that will send the open office file to the converter, then serve the returned microsoft office file to the user. how could I do this? -C 回答1: Check out send_file @file.path, :x_sendfile => true at apidock. This allows you to serve files from the filesystem with rails authentication, but

exposing files from a service through a rails application

佐手、 提交于 2019-12-23 03:01:27
问题 I have a rails application that generates open office files, and I have a service at another location that will convert these open office files to microsoft office files. I'd like to have a controller action that will send the open office file to the converter, then serve the returned microsoft office file to the user. how could I do this? -C 回答1: Check out send_file @file.path, :x_sendfile => true at apidock. This allows you to serve files from the filesystem with rails authentication, but