upload

How to upload an artifact to Artifactory / consume it in a build system (Gradle Maven Ant) where the artifact does not have an extension

偶尔善良 提交于 2019-12-03 14:57:33
I have the following files which I would like to upload to Artifactory as a 9.8.0 versioned artifact. NOTE : The first two files DO NOT have an extension (they are executable files i.e. if you open them/cat on it, you'll see junk characters). Folder/files of a given version 9.8.0 in CVS is like: com.company.project/gigaproject/v9.8.0/linux/gigainstall com.company.project/gigaproject/v9.8.0/solaris/gigainstall com.company.project/gigaproject/v9.8.0/win32/gigainstall.exe com.company.project/gigaproject/v9.8.0/gigafile.dtd com.company.project/gigaproject/v9.8.0/gigaanotherfile.dtd com.company

file upload issue

天涯浪子 提交于 2019-12-03 14:46:47
I will need client (end user) through browser to upload big files (e.g. similar to Youtube's scenario which uploads big video files), the file size should be no larger than 500M bytes. I am using ASP.Net + C# + VSTS + IIS 7.0 as my development platform. Any ideas or good practices about how to handle big file upload issue? Any reference samples or documents are appreciated. <system.web> <httpRuntime executionTimeout="300" maxRequestLength="512000" /> </system.web> This will not work in IIS7! httpRuntime is for IIS6 and bellow. The correct way to allow large file uploads in IIS7 is: 1) Add the

What is the MIME type for TTF files?

二次信任 提交于 2019-12-03 14:26:12
问题 I can't find correct MIME type for TrueType fonts. I need it because I'm using File Uploading Class (CodeIgniter) to upload files, and I want to allow only TTF to be uploaded. Tried this: 'ttf' => 'font/ttf' 'ttf' => 'font/truetype' With no success. Any ideas ? 回答1: TTF does not have a MIME type assigned. You'll have to use the more general application/octet-stream , which is used to indicate binary data with no assigned MIME type. 回答2: I've seen font/ttf and application/x-font-ttf used as

Codeigniter and RestServer. How to upload images?

泄露秘密 提交于 2019-12-03 14:04:57
I am coding an API using Phils RestServer (see link) in Codeigniter. I need a way to upload images via the API. How can I do that? Is it just as simple as making a POST request with the correct headers (what headers to use)? https://github.com/philsturgeon/codeigniter-restserver Thankful for all input! ssaltman Ok, There is another solution here: FIle upload from a rest client to a rest server But neither of these solutions worked for me. However, this is what worked; actually worked. First, I wasn't sure if my file was reaching the method, so I changed the response line to: function enter

ByteArrayOutputStream to a FileBody

最后都变了- 提交于 2019-12-03 13:53:27
I have a Uri to an image that was either taken or selected from the Gallery that I want to load up and compress as a JPEG with 75% quality. I believe I have achieved that with the following code: ByteArrayOutputStream bos = new ByteArrayOutputStream(); Bitmap bm = BitmapFactory.decodeFile(imageUri.getPath()); bm.compress(CompressFormat.JPEG, 60, bos); Not that I have tucked it into a ByteArrayOutputStream called bos I need to then add it to a MultipartEntity in order to HTTP POST it to a website. What I can't figure out is how to convert the ByteArrayOutputStream to a FileBody. Use a

Upload image with alamofire

只愿长相守 提交于 2019-12-03 13:46:47
I'm trying to upload an image to server with Alamofire but my code doesn't work. This is my code: var parameters = ["image": "1.jpg"] let image = UIImage(named: "1.jpg") let imageData = UIImagePNGRepresentation(image) let urlRequest = urlRequestWithComponents("http://tranthanhphongcntt.esy.es/task_manager/IOSFileUpload/", parameters: parameters, imageData: imageData) Alamofire.upload(urlRequest.0, data: urlRequest.1) .progress { (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) in println("\(totalBytesWritten) / \(totalBytesExpectedToWrite)") } .responseJSON { (request, response,

Big files uploading (WebException: The connection was closed unexpectedly)

落爺英雄遲暮 提交于 2019-12-03 13:34:05
问题 UPDATED See post #3 below. There is a need to upload a file to the web automatically (without browser). Host - Mini File Host v1.2 (if this does matter). Didn't find specific api in documentation, so at first i sniffed browser requests in Firebug as follows : Params : do Value : verify POST /upload.php?do=verify HTTP/1.1 Host: webfile.ukrwest.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; ru; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 4.0.20506) Accept: text/html

Looping through lines of txt file uploaded via FileUpload control

青春壹個敷衍的年華 提交于 2019-12-03 13:22:56
I want to select a simple .txt file that contains lines of strings using a FileUpload control. But instead of actually saving the file I want to loop through each line of text and display each line in a ListBox control. Example of a text file: test.txt 123jhg345 182bdh774 473ypo433 129iiu454 What is the best way to accomplish this? What I have so far: private void populateListBox() { FileUpload fu = FileUpload1; if (fu.HasFile) { //Loop trough txt file and add lines to ListBox1 } } 62071072SP private void populateListBox() { FileUpload fu = FileUpload1; if (fu.HasFile) { StreamReader reader =

How can I use getimagesize() with $_FILES['']?

馋奶兔 提交于 2019-12-03 13:15:58
I am doing an image upload handler and I would like it to detect the dimensions of the image that's been uploaded by the user. So I start with: if (isset($_FILES['image'])) etc.... and I have list($width, $height) = getimagesize(...); How am i supposed to use them together? Thanks a lot You can do this as such $filename = $_FILES['image']['tmp_name']; $size = getimagesize($filename); // or list($width, $height) = getimagesize($filename); // USAGE: echo $width; echo $height; Using the condition combined, here is an example if (isset($_FILES['image'])) { $filename = $_FILES['image']['tmp_name'];

Upload a video file by chunks

人走茶凉 提交于 2019-12-03 13:11:57
问题 Yes, it's a long question with a lot of detail... So, my question is: How can I stream an upload to Vimeo in segments? For anyone wanting to copy and debug on their own machine: Here are the things you need: My code here. Include the Scribe library found here Have a valid video file (mp4) which is at least greater than 10 MB and put it in the directory C:\test.mp4 or change that code to point wherever yours is. That's it! Thanks for helping me out! Big update: I've left a working API Key and