How to increase the max upload file size in ASP.NET?

I have a form that excepts a file upload in ASP.NET. I need to increase the max upload size to above the 4 MB default. I have found in certain places referencing the below code at msdn. [ConfigurationPropertyAttribute(“maxRequestLength”, DefaultValue = )] None of the references actually describe how to use it, and I have tried … Read more

How do I upload a file with metadata using a REST web service?

I have a REST web service that currently exposes this URL: http://server/data/media where users can POST the following JSON: { “Name”: “Test”, “Latitude”: 12.59817, “Longitude”: 52.12873 } in order to create a new Media metadata. Now I need the ability to upload a file at the same time as the media metadata. What’s the best … Read more

REST API – file (ie images) processing – best practices

We are developing server with REST API, which accepts and responses with JSON. The problem is, if you need to upload images from client to server. Note: and also I am talking about a use-case where the entity (user) can have multiple files (carPhoto, licensePhoto) and also have other properties (name, email…), but when you … Read more

How to resolve the C:\fakepath?

<input type=”file” id=”file-id” name=”file_name” onchange=”theimage();”> This is my upload button. <input type=”text” name=”file_path” id=”file-path”> This is the text field where I have to show the full path of the file. function theimage(){ var filename = document.getElementById(‘file-id’).value; document.getElementById(‘file-path’).value = filename; alert(filename); } This is the JavaScript which solve my problem. But in the alert value gives … Read more

How to get full path of selected file on change of using javascript, jquery-ajax?

How to get full path of file while selecting file using <input type=‘file’> <input type=”file” id=”fileUpload”> <script type=”text/javascript”> function getFilePath(){ $(‘input[type=file]’).change(function () { var filePath=$(‘#fileUpload’).val(); }); } </script> but the filePath var contains only name of selected file, not the full path. I searched it on net, but it seems that for security reasons browsers … Read more

Sending multipart/formdata with jQuery.ajax

I’ve got a problem sending a file to a serverside PHP-script using jQuery’s ajax-function. It’s possible to get the File-List with $(‘#fileinput’).attr(‘files’) but how is it possible to send this Data to the server? The resulting array ($_POST) on the serverside php-script is 0 (NULL) when using the file-input. I know it is possible (though … Read more