FAQ Database Discussion Community


Uploading big files with POST freezes the system

osx,qt,file-upload,qnetworkaccessmanager
i have an application which upload files (video files) to a server using the standard post request, something like: QNetworkRequest request(QUrl("myUrl")); QString bound="margin"; QByteArray data(QString("--"+bound+"\r\n").toLatin1()); data += "Content-Disposition: form-data; name=\"media_id\"\r\n\r\n"; data += id + "\r\n"; data += QString("--" + bound + "\r\n").toLatin1(); QString str = "Content-Disposition: form-data; name=\"file\"; filename=\"" +...

$_FILE is empty when upload in PHP

php,jquery,file,file-upload,upload
I was using the dropzone.js to handle the upload part in frontend, using jquery. http://www.dropzonejs.com/ My testing case are : Upload a 34 MB file. Works fine Upload a 27 MB file. Works fine Upload two files, each of them are 5 MB. Works fine Upload two files, 34 MB...

Symfony2 posting a file through REST API

php,rest,symfony2,file-upload
I'm building a REST api using Symfony2, FOSRestBundle and JMSSerializerBundle. I have an URL that I use to change a user's avatar. /api/users/{id}/avatar.json I want to send an image to that URL to modify the avatar, but I get this error "The form's view data is expected to be an...

Adding timestamp and custom name to a File uploaded via PHP

php,date,file-upload,timestamp,createfile
I was looking for a way to add a timestamp and a custom name to a file uploaded to my server via php. I does some readings on $_FILE[] to understand its arguments, but the official PHP docs give no detailed explanation. This is the code I use to upload,...

o'reilly adds extra path. Why?

file-upload,multipart-form
Here is my code to set upload path: FileManager fm = new FileManager(); String srcPath = fm.directoryPath("ownOIPath"); MultipartRequest multi = new MultipartRequest(req, srcPath, 50 *90000 * 90000, new com.oreilly.servlet.multipart.DefaultFileRenamePolicy()); "srcPath" is read from *.properties file. Path I provided in properties file is: ownOIPath = /var/www/vhosts/globalsteelweb.com/httpdocs/UploadedFiles/ownOI/ I changed this path and...

File upload doesn't works from Android browser

asp.net-mvc,file-upload,iis-7,android-browser
File upload doesn't works from Android browser but works fine in PC browser. my MVC code work good in local IIS express [HttpPost] public string UploadJson(string id) { try { string uploadFial = "noSave"; if (Request.Files.Count > 0) { var file = Request.Files[0]; if (file != null && file.ContentLength >...

Cannot save multiple files to database with Foreign Key

sql-server,asp.net-mvc,entity-framework,stored-procedures,file-upload
In my MVC application I have two tables called Ticket and Attachment and I want to save attachments for per ticket. The problem is that: I need to save multiple attachments with the TicketID when creating a new ticket. So, I think I should create a new ticket in the...

Two bundles use the same event listener

php,symfony2,file-upload,salesforce
In my Symfony2 project, I have two bundles: UploadBundle, which registers the uploaded file into a Database; and * UploadSfdcBundle, which registers the upoaded file in SalesForce I am using oneup/uploader-bundle to upload the files. I configured the event listener for each Bundle like this: For uploadBundle: services.yml: services: envivio_upload.upload_listener:...

php function to check when an uploaded image has been in the directory for longer than a day

php,file-upload,controller,cron,unlink
I have a cron controller class that basically handles all cron job related work. I'm trying to add a function to the controller that deletes images that have been in the directory longer than a day. Here is what I have so far, and it makes sense to me I...

Django image upload succeeds with url written to DB but no image shows upload target folder

python,django,windows,file-upload,django-uploads
I have form in Django class BusinessForm(forms.Form): name = forms.CharField( required = True, max_length=MAX_NAME_LENGTH, widget=forms.TextInput(attrs={'placeholder': 'e.g Boston Market'})) image = forms.ImageField() which belongs to this model class Business(models.Model): """ Describes Bussines data type """ name = models.CharField(max_length=BUS_NAME_LENGTH) img = models.ImageField( upload_to = UPLOAD_TO ) where UPLOAD_TO = 'business/images' and in...

Can the uploadcare widget be used without the uploadcare service?

file-upload,uploadcare
Can uploadcare-widget be used without using the upload care service? The goal: Use the widget (specifically to allow users to upload files from their google drive/dropbox accounts). Instead of using upload care's backend, use your own backend, i.e. node.js/aws s3. ...

PHP Undefined index on file upload

php,file-upload
I'm trying to upload a file but I always get an error: Notice: Undefined index: file_pdf in C:\xampp\htdocs\FYP2\site_admin\pentadbiran\upload.php on line 10 The example of my code get data from a form and upload to my database for the information given, such as file_reference, file_name, file_location and file_pdf. But the problem...

How to save multiple files to database rather than disk

asp.net-mvc,file-upload,kendo-ui,jquery-file-upload,kendo-upload
I tried to apply the method on this page, but this sample save the files to disk instead of Database. So, could you please inform me what changes should be made on the sample method or is there any sample using this Kendo Upload to save multiple files to database?...

FileUpload content is empty

c#,asp.net,file-upload
I know there's many questions about the same topic, but I haven't see one that addresses my issue. So I have an UpdatePanel in it's ContentTemplate I have a ListView with a Panel, inside it is there's a FileUpload, a Cancel button and an Upload button. When Upload button is...

How to manipulate local files with webdav

javascript,jquery,rest,file-upload,webdav
Hi so I just found out that webdav protocol allows for manipulations of local files through a browser. I have it already set up in the back end. What I would like to know is how to make it work on front end. I am using javascript with jQuery. For...

Upload zip files to service for user download

node.js,file-upload,express,amazon-s3,zip
I have an express (node.js) application that creates mp3 files for a user and stores them in a folder on the server. The server's file structure looks like this: data/ id#/ song1.mp3 song2.mp3 song3.mp3 id#/ song1.mp3 song2.mp3 song3.mp3 ... I want to create zip files and download links for the...

Renaming images in a multi-file upload project to correspond with number of images selected

php,html5,session,file-upload,session-variables
I'm dealing with a few issues regarding multiple file uploads. My project deals with a form the user inputs multiple images that save to a database, but first temporarily stores the images in a directory to show a preview of sorts. In my class that deals with the uploading of...

Upload multiple images in multiple numbers from multiple fileuploader

asp.net,file-upload
I have searched a lot but fail to get a appropriate Answer. So, I am again posting this question. Please below picture, where I have 3 file uploader. Each Uploader can upload multiple files. After clicking on the Upload file button all the files should be uploaded into a folder...

How to create file upload like gmail?

javascript,jquery,file-upload,upload
I am having a code with "upload" and done "button". It will select the file on clicking of "upload" and upload the file on clicking "Done" in the given location. But I need to auto-upload file, like Gmail attachment. Can anyone help me out pls

Why UploadProgressChanged in WebClient.UploadFileAsync work not correctly?

c#,wpf,file-upload,upload
I'm upload file and get upload progress like this: using (var wc = new WebClient()) { wc.UploadProgressChanged += FileUploadProgressChanged; wc.Headers.Add(HttpRequestHeader.ContentType, "image/png"); wc.UploadFileAsync(new Uri(url), filePath); } ... private void FileUploadProgressChanged(object sender, UploadProgressChangedEventArgs e) { ProgressBarUpload.Value = e.ProgressPercentage; } But after 50% e.ProgressPercentage return -441850 and then immediately returns 100. Why is...

Trying to write a unit test for file upload to a django Restless API

python,django,rest,file-upload,request
I'm writing a fairly small lightweight REST api so I chose restless as the quickest/easiest support for that. I didn't seem to need all the complexity and support of the django-REST module. My service will only received and send json but users need to upload files to one single endpoint....

move_uploaded_file() is not working but copy is working(), why?

php,html5,file-upload
Ok I have a question just to increase my knowledge. My problem is little bit solved I was trying to move the uploaded file from on directory to another for that, I was using "move_uploaded_file()" with same path and file name but it was not working Then I tried to...

Recursive method in python

python,sockets,python-2.7,file-upload,ftp
I am trying to send csv files to remote server via ftp but sometimes i get socket error: Now i want to make function resursive so that if function fails to send file via ftp it should try again. This is what i am doing , how can i upload...

How to convert base64 string to image binary file and save onto server [duplicate]

c#,asp.net,canvas,file-upload,character-encoding
This question already has an answer here: C# Base64 String to JPEG Image 3 answers As an example I have converted a canvas element with a re-sized image and posted into a hidden input field that's now encoded as data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD... This value then posted to the same page which...

Spring MVC not resolving image path stored outside webroot

java,spring,spring-mvc,file-upload
I am uploading images and videos and creating respective tags for video and audio to display on view page but somehow image and video path are not getting resolved. Here is my controller. @RequestMapping(value = "/contentUpload", headers = "content-type=multipart/*", method = RequestMethod.POST) public @ResponseBody String uploadImage(@RequestParam("fileData") MultipartFile multipartFile, HttpServletRequest request...

Angular fileupload dropzone does not work

javascript,angularjs,file-upload
I have the following controller:. app.controller('DashboardController', ['$http', '$scope','$sessionStorage','$log','Session','api','FileUploader', function ($http, $scope, $sessionStorage,$log, Session, api,FileUploader) { $scope.post = {user_id: $sessionStorage.user.user.id}; var uploader = $scope.uploader = new FileUploader({ url: 'js/controllers/upload.php' }); // FILTERS uploader.filters.push({ name: 'customFilter', fn: function(item /*{File|FileLikeObject}*/, options) { return this.queue.length < 10; } }); // CALLBACKS...

Selenium webdriver - unable to upload file with AutoIT

java,selenium,file-upload,selenium-webdriver,autoit
I'm unable to upload file with AutoIT v3 try with many ways, but no luck to get it work method one: (get Element is not currently visible) driver.findElement(By.xpath("//input[@type='file']")).click(); Runtime.getRuntime().exec("D:\\Documentation\\Script To Upload File.exe"); method two: (get Element is not currently visible) driver.findElement(By.name("fileName")).click(); Runtime.getRuntime().exec("D:\\Documentation\\Script To Upload File.exe"); method three: (PASSED: testCaseOne, but...

Storing user submitted images

node.js,file-upload,amazon-s3,amazon-cloudfront
I'm building a node application in which users can submit images to customize their profile. I'm wondering what the best way would be to store these images? Is something like Amazon S3 the way to go? What about CloudFront, can this accept user submitted images? Sorry if this question is...

AngularJS: speedUp opening of the big images (base64)

javascript,angularjs,image-processing,file-upload
i have one question about image uploading. Maybe i do something wrong? $scope.photoChanged = function(files) { $scope.files = files; var reader = new FileReader(); reader.onload = function(e) { $scope.imagecontent = e.target.result; if (!$scope.$$phase) { $scope.$apply(); } }; reader.readAsDataURL(files[0]); }; here i try to upload image into browser and view it...

How to save a file that was uploaded via AngularJS and Play Framework 1.3?

java,angularjs,file-upload,playframework
I'm adding file upload functionality to the form of data collection for some clients. Have such a problem... Here is a simple file upload functionality. I'm uploading the file to the server, but can not save it there. Generally speaking, I would like to keep the file in the database,...

Django: How to upload file without UnicodeEncodeError on save()?

python,django,file-upload,locale,python-unicode
IM try to upload a file but when the file name have caracters like "ó" have a 'ascii' codec can't encode character u'\xf3' in position 59: ordinal not in range(128) im try to obj.file = smart_unicode(form.cleaned_data["file"]) before save() on views.py and def file(instance, filename): i = datetime.now() filename = smart_unicode(filename)...

Abort fileupload with jQuery 1.2

jquery,ajax,file-upload,drupal-6
I'm developing modules for an older Drupal 6 website. The current task is to abort the preview generation of custom posters. For this the user can upload his logo and change some text. The form containing these info is submitted and the preview is displayed via ahah. According to several...

asp:FileUpload in ASP.Net 3.5 is not working as expected

asp.net,.net,file-upload
I am using asp.net 3.5 version. In a single page I have 5 asp:FileUpload controls. I have tried using the following code: string path = Server.MapPath("~/MyFiles/"); string filename = ""; string extension = ""; int fcount = 1; HttpFileCollection HFC = Request.Files; for (int c = 0; c < HFC.Count;...

How to ask the user to upload a file and use it in my code

javascript,json,angularjs,file-upload,upload
Hey guys I'm trying to know how to replace a json with another json a user upload. This is my javascript code var app = angular.module('miApp', []); app.controller('mainController', function ($scope, $http) { $http.get('cuidades.json').success(function(data){ $scope.cities = data; }); }); And this is my html code, with this code I can get...

PHP - Upload file reset

php,apache,file-upload
I'm facing an upload issue using PHP. I upload the file using a form and the input type file provided from HTML, and I have to upload large files (max size 500MB). I have edited my php.ini file in this way: max_execution_time = 7200; max_input_time = 7200; memory_limit = 500M;...

p:fileUpload invalid size message is not localized according locale config

jsf,file-upload,primefaces,localization
When a user uploads files which is larger than the allowed size he gets a error-message in english and not the language which I set in faces-config.xml There are any special settings needed to display the error-message in the right language? The other error messages for example on the field...

Upload file to Azure Blob from HTML webpage (C#)?

c#,azure,file-upload,azure-storage-blobs
I am trying to figure out how to take a file from an html form and save it to my Azure Blob storage. I have found many posts about doing this for JavaScript but I am trying to do it via C#. One source I found said to do using...

Why do I get java.io.IOException: Stream Closed? (java 7)

java,file-upload,inputstream
I try save uploaded file as described here using Files.copy(inputStream, path to file,replace existing) Here is method that throw exception public void handleAudioUpload(FileUploadEvent event) { UploadedFile audio = event.getFile(); try (InputStream audioInStream = audio.getInputstream();) { MP3Util util = new MP3Util(audioInStream); Map<String, String> tags = util.getAudioTags(); System.err.println(tags); System.err.println(webAppPath); Date currentDate =...

How to upload a photo in Meteor to S3 and have it sync to database item?

mongodb,file-upload,meteor,amazon-s3
I am creating a cookbook web application and would like a picture to be uploaded with each new recipe. I am using this package: Amazon S3 File Uploader(https://github.com/Lepozepo/S3). I can successfully do two things upon clicking submit for a new appetizer: Add a new appetizer name and description to the...

Uploading Rails to a website

ruby-on-rails,ruby,web-services,postgresql,file-upload
I am new to Ruby on Rails. I have developed my own web application, and it is running well on my local rails server. But the question is - How can I upload it to a website? Right now I have a website on freehostingnoads.net, in near future I want...

How to get public link for the uploaded file on google cloud storage in local dev server(Google App engine+JAVA)

java,google-app-engine,file-upload,google-cloud-platform
I am trying to upload the image files using gcs client library+java in local google app engine dev server. Images are uploaded successfully and i can see the entries created in local datastore under localhost:8888/_ah/admin/datastore How to get the public key for the uploaded images so that i can show...

Laravel - Get instance of file from string path

php,windows,laravel,file-upload,laravel-5
My laravel application successfully uploads and stores my files where I want them to. However, I don't want to store the public url of the file in the database, and instead get them on the fly (they're stored in my public directory) and show a list of links to the...

Protractor image upload doesn't work on IE and firefox

javascript,selenium,file-upload,selenium-webdriver,protractor
I am trying to upload image on the input type:file control using protractor. I am using the below code: var basePath='../testdata/testappicons/accepted'; var randomIcon=randomIntFromInterval(1,6); var overallPathToIcon=basePath+randomIcon+'.png'; var fileToUpload = overallPathToIcon; console.log(fileToUpload); var absolutePath = path.resolve(__dirname, fileToUpload) browser.executeScript('$(\'input[type="file"]\').attr("style", "");'); $('input[type="file"]').sendKeys(absolutePath); The above code works well on the chrome and I am able...

Custom upload file on Prestashop page

php,file-upload,prestashop
I made a separate page (following this guide) so he can upload pdf files (certificates of their products). And another page to the customer's search according to the selected product. On the file upload page, the logic is as follows: In a form: Select the product (from a selector), and...

How to upload files using multiple files input element?

angularjs,node.js,file-upload,express,multer
I'm trying to upload multiple files from multiple input element in one form. For exemple : <form id="category-form" method="post" enctype="multipart/form-data" class="form" name="form"> <div class="form-group"> <p>Pictures of the A Category</p> <input id="a_pics" accept="image/*" type="file" class="file" multiple="true" my-file-upload="a_pics" required/> </div> <div class="form-group"> <p>Pictures of the B Category</p> <input id="b_pics" accept="image/*" type="file" class="file"...

Copy web-builder created website to new hosting

file-upload,mapping,hosting
I have a website created in a web-building online app (link to the app: http://www.webnode.com). The app doesn't allow me to actually view the folder structure of my web, it's something more like creating a blog using blogspot by google or similar web apps. The problem is that I want...

Upload images to uploads folder _ JavaScript

javascript,node.js,forms,file,file-upload
Users will be able to either send a text post(input type="text") or image post(input type="file"). But they won't be sending both Here's my form (in Jade): form#addPost(action="/uploads", method="post", placeholder='Add your ideas here...') input#postinput(type="text", name="contents" placeholder="Add your ideas here...") div.privacy(class="onoffswitch", id='privacytog') input(type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked) label(class="onoffswitch-label" for="myonoffswitch")...

Paperclip image upload (base64) - getting 500 internal server error (undefined method 'permit')

ruby-on-rails,ruby,file-upload,paperclip
I'm trying to upload an image using Paperclip; I followed the paperclip quick start guide as closely as possible, but I'm doing something wrong and can't find out what. I'm new to Ruby and Rails; the whole project is set up with the AngularJS framework. What I'm doing is sending...

Django file upload took forever with Phusion Passenger

django,apache,file-upload,passenger
I have a Django app deployed using Passenger (I did not choose mod_wsgi because mod_passenger is already there and being used). When I uploaded an MP3 file (900 kB), Google Chrome displays upload % which reached 100% pretty fast but then it took forever for the resulting page. The database...

File Upload Conditional

php,if-statement,file-upload
I have an html form with some text and file inputs that submits to a PHP page. I want to error check the image file input but only if they choose to include one. Is there a way to check if there's an uploaded image file? I included my attempt...

Random file-name after ftp upload in delphi

delphi,file-upload,ftp,indy
I am working an application which needs to upload files to server. I am using delphi and TIDFtp to upload files. Everything works ok, except the file name after upload is randomly generated. The file in my machine is named test.txt and after upload its named in the server like...

jQuery File Upload, enable binary file upload

javascript,jquery,django,file-upload,mime-types
I am currently looking for an HTML5 and Javascript based file uploader and came across jQuery File Upload. jQuery File Upload seems to have everything I need. https://blueimp.github.io/jQuery-File-Upload/basic.html To quickly test jQuery File Upload capabilities in connection with Django I was lucky to find the "django-jquery-file-upload" project on GitHub. This...

Model-independent Rails 4 file upload in dynamically loaded (nested) form field

ruby-on-rails,file-upload,nested-forms,nested-attributes,form-helpers
I'm looking for a way for simple image upload onto the file system so that the image is not stored in the database. I understand this step is rather easy, just using a file_input tag, however I have problems making it happen because of how my form is built. I...

Post FormData not working in IE9

javascript,file,file-upload
The following code does not post the file data to the server in IE9. FormData() object looks to be the issue but not sure how to resolve it. I used form.serialize() but this is not uploading the file. Im hesitant to implement a JQuery file uploader just for this function....

javax.servlet.ServletException the request doesn't contain a multipart/form-data or multipart/mixed stream

ajax,jsf,file-upload,jsf-2.2,mojarra
I've the below form which uploads a file via <h:inputFile> and <f:ajax>. <h:form enctype="multipart/form-data"> <h:inputFile id="file" value="#{bean.file}" /> <h:commandButton value="Upload" action="#{bean.upload}"> <f:ajax execute="file" render="file" /> </h:commandButton> </h:form> When I submit it, I get a JavaScript alert with the below error information: serverError: class javax.servlet.ServletException the request doesn't contain a multipart/form-data...

File upload pdf issue

ruby-on-rails,ruby,image,pdf,file-upload
I'm using carrierwave, minimagick and Rails 4. I have a FileUploader that looks like: class FileUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick version :thumb, if: :image? do process :resize_to_limit => [50, 50] end version :thumb, unless: :image? do process :cover process :resize_to_fill => [50, 50, Magick::NorthGravity] process :convert => 'png' end protected...

PDF type files not loading despite MIME type inclusion

php,pdf,file-upload
I have a form that aims to upload pdf's, MSWord docs, MSExcel files, and MSPowerpoint. I'm tying to do a PHP validation as follows <?php if (isset($_FILES['fileupload'])){ $filetype = array('application/pdf', 'application/msword', 'application/mspowerpoint'); if (in_array($_FILES['fileupload']['type'], $filetype)){ if(move_uploaded_file($_FILES["fileupload"]["tmp_name"], "/var/www/uploads/" . $_FILES["fileupload"]["name"])){ $filename = basename($_FILES['fileupload']['name']); echo $filename; }//close moveupload }//close in_array }//close...

How much csv parsing can/should be processed in the front-end?

html,json,rest,csv,file-upload
I am about to: create a web interface where the user can type in email addresses, which are then sent up to the server in one json bulk, which is then used for messaging these users. I also have the requirement to be able to upload a csv file with...

Adding image upload using WeldPad extension

javascript,file-upload
For uploading images, I have found this extension in the social network res-upload, but whan I use it, It failes to upload the images. How can I make this extension upload the image? This is res-upload design <!-- Polyfill Web Components support for older browsers --> <script src="http://weldpad.com/designer/components/webcomponentsjs/webcomponents.js"></script> <link rel="import"...

Does Flask automatically delete aborted large file upload?

python,file-upload,flask
My Flask application will allow the upload of large files (up to 100 Mb) to my server. I was wondering how Flask managed the chunked file if the client decides to stop the upload half way. I read the documentation about File Upload but wasn't able to find that mentioned....

How do I declare dropZone element in AngularJS version of File Upload?

angularjs,file-upload,jquery-file-upload
Using AngularJS version of File Upload (https://blueimp.github.io/jQuery-File-Upload/angularjs.html) I'm trying to figure out how I can declare dropZone via HTML attributes - an equivalent of: $(el).fileupload({ dropZone: $('.dropZone', this) }) ...

Visual Basic Max File Size Error

asp.net,.net,vb.net,file-upload,error-handling
Protected Sub AddFileButton_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) Dim fileSize = FileUploader.PostedFile.ContentLength If FileUploader.HasFile Then Try Dim extension = System.IO.Path.GetExtension(FileUploader.FileName) Dim uniqueFileName = System.Guid.NewGuid.ToString() & extension FileUploader.SaveAs("\\path\" & FileUploader.FileName) Catch ex As Exception Info.Text = "ERROR: " & ex.Message.ToString() End Try Else If fileSize > 1048576 Then...

How to convert the file/s upload request made through Filepicker into the similar request made by using simple HTML File control/s in PHP?

php,file-upload,filepicker.io,filepicker,input-type-file
I've simple HTML File control/s on my form. It's dynamic in nature, means user can upload one or multiple files. Its HTML is as follows : <input type="file" id="image_book" class="image_book upload" name="image[]" accept="image/*" value=""/> If I upload two images using above HTML file control and submit the form I get...

UploadedFile is null when uploading file with

jsf,file-upload,primefaces,nullpointerexception
I need to upload an image into the server. I'm using primefaces, here is my code: deposit.xhtml <h:form> <p:fileUpload mode="simple" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" value="#{imageHandler.uploadedPicture}" /> <p:commandButton action="#{imageHandler.savefile(imageHandler.uploadedPicture)}" value="Déposer" ajax="false" /> </h:form> ImageHandler: @ManagedBean (name = "imageHandler") @RequestScoped public class ImageHandler { private UploadedFile uploadedPicture; // +getter+setter public void savefile(UploadedFile...

Editing Hosted Webpages in IIS

css,visual-studio,file-upload,iis-7.5
I am very new to IIS in general, but I have recently published a webpage for a client on a IIS 7.5 server. What is the best, or a good practice to editing webpages? I am trying to make some CSS adjustments for mobile devices accessing the webpages, and it...

PHP get image from download.aspx link

php,curl,file-upload,ftp
I want to achieve the following: Get the image from a link, which is always something like the following: https:// ----- /download.aspx?AttachmentType=1001&AttachmentId=c183866d-5fea-e411-9439-00155d011304&CRMWRPCToken=DrGw9N%2bVEeSUOAAVXQETBKgIhPRR8QqL68%2bsPxj1c1zwXvEnxVp9qf8oSKBxujEc&CRMWRPCTokenTimeStamp=635664318841108553 and copy it to my FTP server. I already tested another URL and the code is working like a charm. But when I try to upload the image...

Check filesize before uploading to file system

javascript,asp.net,internet-explorer,file-upload,activex
Just a quick question, I have done a lot of research on this already but I have a different approach. My problem: I have a file uploader that works in all browsers using asp.net with VB. The issue is that our system only allows files to be uploaded that are...

File upload web api 2.0 error after deployment on IIS 8.5

c#,iis,file-upload,asp.net-web-api2
The below code works very well on development environment VS 2012, the images are saved to App_Data. When I deployed the same on Win 8.1, IIS 8.5, the App_Data was missing. I manually create the folder and set the properties as given in http://hintdesk.com/tutorial-publish-asp-net-web-api-in-iis-8-5-and-windows-8-1/. I am seeing strange behavior as...

React-native upload image to amazons s3

javascript,file-upload,amazon-s3,fetch,react-native
I want to upload images from my app to S3 server. I have all data and codes calculated (tested using curl on computer) but I can't figure out how to call 'fetch' correctly. I'm getting response: 'At least one of the pre-conditions you specified did not hold. Condition: Bucket POST...

Using JavaScript or JQuery to clear a file upload field if the file selected is not a certain type [duplicate]

javascript,jquery,html,validation,file-upload
This question already has an answer here: Limit file format when using <input type=“file”>? 8 answers I have essentially re-skinned a file-upload form field. <input id="uploadFile" placeholder="Choose File" disabled="disabled" /> <div class="fileUpload btn btn-primary"> <span>Upload</span> <input id="uploadBtn" type="file" class="upload" /> </div> .fileUpload { position: relative; overflow: hidden; margin: 10px;...

Change filename on PHP5 file uploader

php,file-upload
I have this code for a PHP image-only uploader. <?php $target_dir = "cdn/uploads/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $file_name = basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $username = $_SESSION['user_name']; $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); // Check if image file is a actual image or fake image if(isset($_POST["submit"])) { $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if($check !== false)...

Spring MVC - upload file shows The request sent by the client was syntactically incorrect

java,spring-mvc,file-upload,spring-security
When I upload file with another details using form sumbmition, it shows an error HTTP Status 400 - type Status report message description The request sent by the client was syntactically incorrect. jsp page <form:form method="POST" action="addbanners?${_csrf.parameterName}=${_csrf.token}" modelAttribute="banner" enctype="multipart/form-data"> <h2>New Banner</h2> <table> <tr><td>Banner Name</td> <td><form:input type="text" name="thematicdayid" id="thematicdayid" path="bannerName"...

Laravel 5.1 AWS S3 Flysytem: AWS HTTP error: cURL error 6: Couldn't resolve host name

curl,file-upload,amazon-s3,laravel-5,host
I'm on my local environment and are about to enable file uploading to AWS s3, using Laravel 5.1 Flysystem/Filesystem. All setup has been done. I have created a test form, and I'm trying to upload a file. When I push the submit button, I get this absolutely, only too lovable...

Uploading/Downloading word file to/from Mysql

java,mysql,file-upload
I am in the process of creating an app that allows a user to fill in a from and upload their CV to a potential employer. At the moment I am stuck on uploading the CV to my database. //File chooser JFileChooser fc = new JFileChooser(); fc.setCurrentDirectory(new java.io.File("C:\\Users\\Dawid\\Desktop")); fc.setDialogTitle("CV Upload");...

Notice: Undefined offset: 1 on array size 2

php,parsing,csv,file-upload
I have this CSV file: german,6357787,hombre; patricia,666565656,mujer; And this PHP processor: if((!empty($_FILES["csv1"])) && ($_FILES['csv1']['error'] == 0)) { //CHECK NOMBRE $filename = basename($_FILES['csv1']['name']); // CHECK EXTENSIÓN $ext = substr($filename, strrpos($filename, '.') + 1); //CHECK FORMATO & MIMETYPE if ( ( ($ext == "csv") ) && ( (in_array($_FILES['csv1']['type'],$mimes)) ) ) { //ANALISIS...

File upload via h:inputfile (prettyfaces) does not work

jsf,file-upload,glassfish,jsf-2.2,prettyfaces
I'm trying to upload a file to the glassfish application server (v4.1) via h:inputfile. xhtml-file and bean are prepared as almost every example in the web shows. I tried with and without Pretty Filter in web.xml, allowCasualMultipartParsing in context.xml, and a handful of other possible workarounds. None of them seemed...

Problems with uploading some of PDF files in Laravel 5

pdf,file-upload,laravel-5,mime-types
I have an application based on Laravel 5 with file upload functionality. Everything works fine except uploading of some PDF files. The applications can not upload some of PDF files, and when I try to open them, they seems normal like any other PDF files. Any idea how to solve...

MVC Large File Uploads Running Out of Memory

c#,asp.net-mvc,memory,file-upload,sqlfilestream
.Net 4.5.1 - MVC5 - EF6 The requirement is to allow large file uploads(<200MB). I have a ViewModel with HttpPostedFileBase. I set the Input Stream of that to a DB Entity NonMapped Stream Property. Which is then sent to the Repository where I save the Copy the Stream to a...

Plupload: perform custom check before starting upload

javascript,c#,asp.net-mvc,file-upload,plupload
I have an MVC 5 view with a form and a plupload file uploader section. Upload is triggered by a button on the form. I have no problem uploading file chunks to the server and setting the parameters to the query string and all, but what I do have a...

What's the best way to attach multiple files to a entity on creation?

c#,asp.net-mvc,file-upload
This is more so a question/best practice question than an issue. I currently have two pieces of code, one that creates an entity, and one to upload a file using Dropzone.js. The files are uploaded before the user creates the entity. I'm wondering, what exactly is the best way to...

How to upload only pdf files in PHP

php,file-upload
I know this must be a repeated question but I have a different requirement here. What I want is when a user clicks on the Upload button, the dialog-box that appears only allows the user to upload the PDF file type only and nothing else. What I've seen so far...

PHP - how to send e-mail after successful file upload? [duplicate]

php,email,file-upload
This question already has an answer here: PHP mail form doesn't complete sending e-mail 10 answers I need a PHP to send an email if a file was uploaded successfully. My code is working fine like this: <?php $target_dir = "gallery-sys/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1;...

Uploading image from canvas to S3 in Meteor

canvas,file-upload,meteor,amazon-s3
I have no experiene with file uploads in any programming language, so this is a bit of hassle for me. I have a canvas that needs to be saved in a bucket in Amazon S3 (or any other good service if it's simpler). I know about toDataURL() and that it...

upload a file with the same name

php,file,file-upload,file-permissions
I want to upload a file from my android application. The first time it happens successfully but the second time if I want to replace the file it won't do anything. <?php $file_path = "usuario/"; $file_path = $file_path . basename( $_FILES['uploaded_imagen']['name']); if(file_exists($file_path)) { unlink($file_path); } if(move_uploaded_file($_FILES['uploaded_imagen']['tmp_name'], $file_path)) { echo "success1";...

CKEditor 4.5.0 BETA fileUpload API issue

file-upload,ckeditor
I'm trying CKEditor 4.5.0 BETA because it let me paste images from the clipboard in all browsers, but I can't find any documentation regarding the File Upload API (new?), the example in This Link uses CKFinder but I don't have it, I need to create my own Server Side code...

How do you get all uploaded files in CakePHP?

php,cakephp,recursion,file-upload,cakephp-3.0
How do you get all uploaded files in CakePHP 3.x? Here is my controller to get you on track. <?php class MyController extends AppController { public function upload() { // how to loop through all files? } } Sample form <form action="/my/upload" method="post" enctype="multipart/form-data"> <input type="text"> <!-- any number of...

Storing a file into a database & uploading it in a webpage [closed]

php,mysql,database,file-upload,upload
Background I'm creating a website where the user can store an article as a file in the database and than upload the file's content into a page in the website using a form. The file may only contain text or image or both. Question Can anyone walk me through this?...

Https upload MultipartForm returns 401 unauthorized

c#,forms,file-upload,https,http-status-code-401
I’m trying to upload a coverity scan result to coverity. This is my code: public static void Main( String[] args ) { var client = new HttpClient { Timeout = TimeSpan.FromMinutes( 20 ) }; var form = new MultipartFormDataContent { { new StringContent( "my tooken" ), "token" }, { new...

PHP File Upload Response

php,cordova,file-upload,xampp,server
I am sending a file to the server using phonegap filetransfer plugin. File Transfer plugin is showing transfer successful but when i checked my server no file is there. When i checked the response code it is showing the following: Array( [file]=>Array ( [name]=> hlc_parkingkanyakumari11-5-2015 1183232.db [type]=> [tmp_name]=> [error]=>1 [size]=>0...

Micro timestamp and/or random string to file name

php,file-upload
So part of my upload file is setting the name of the file but I am struggling to get it to append a time stamp onto the file name or set a random string or both? Here is where it is setting the file name and type: if ( move_uploaded_file($_FILES['upload']['tmp_name'],...

error: Bad content type. Please use multipart

javascript,angularjs,file-upload,xmlhttprequest,google-cloud-storage
I'm totally new to file uploads....I'm using angular-file-upload which creates an XHR outside of angularjs to upload files to google cloud storage. When I try to upload I keep getting the error below. How can I resolve this? 400 Bad content type. Please use multipart. Here's my controller setup: var...

Uploading Image to Google Forms

javascript,file-upload,google-form
google forms file upload complete example In reference to this question and excellent answer by Sandy Good. Since my question on the post itself was immediately deleted because reasons, I'll ask it here. I'm just wondering if anyone knows if it's still working. I did everything it says, and it...

BackgroundTransferService with POST method and Parameters

c#,windows-phone-8,file-upload,windows-phone,background-transfer
I want to upload a file (VideoFile) to server through BackgroundTransferService. My problem is, I also want to send 2 parameters along with File (POST request). So, is it possible to send parameters along with File upload while using BackgroundTransferService API..? Code with BackgroundTransferService: BackgroundTransferRequest req = new BackgroundTransferRequest(new Uri("ServerURL",...

PHP Upload Premission Denied

php,html,file-upload
I'm made one upload PHP script that worked 5-6 times... Now when I moved it to another file it isn't working. i'm getting this message File is an image - image/png. Warning: move_uploaded_file(Viruss.png): failed to open stream: Permission denied in /var/www/html/WEB Dictionary/profile.php on line 57 Warning: move_uploaded_file(): Unable to move...

Multiple Image Uploader with Preview

javascript,html,file-upload,image-uploading
I've created an Image Uploader but it's not working properly. I'm not able to understand where am I going wrong. The JSFIDDLE of my image uploader is given below: JSFIDDLE The problem I am facing is when I click on choose files and select more than one files and open...

uploading file using ashx filehandler and ajax always return error

jquery,.net,file-upload,webforms,ashx
I am using jquery-file-upload from blueimp (https://blueimp.github.io/jQuery-File-Upload/). I have FileHandler.ashx for file uploads. I am not able to return correct response from file handler. On javascript side, it always receives error. Please, guide me. // File handler (FileHandler.ashx) public void ProcessRequest(HttpContext context) { string fname = String.Empty; if (context.Request.Files.Count >...

How to upload a file using zend HttpClient?

php,rest,file-upload,zend-framework2
I'm using HTTP client. How to attach a file while sending a post request? Here's my code: function executePost($postdata = [], $full_file_path = ''){ self::$client = new Zend\Http\Client(null, ['timeout' => 30] // updated to 30 sec ); self::$client->setEncType(Zend\Http\Client::ENC_URLENCODED); self::$client->setUri($url); self::$client->setMethod($method); self::$client->setParameterPost($postdata); $response = $client->send(); Debug::dump($response->getContent(),$label='Response',$echo=true); } I have tried...

Upload Large Video files to the server from android

php,android,file-upload
I know how to upload the file from android and I am able to do it by using the following code private void doFileUpload(MessageModel model) { HttpURLConnection conn = null; DataOutputStream dos = null; DataInputStream inStream = null; String lineEnd = "\r\n"; String twoHyphens = "--"; String boundary = "*****";...

fputs not writing image on the server

file-upload,nginx,php-fpm
$data = file_get_contents($url); $image = config_item('temp_upload').$image_name; $file = fopen($image, 'w+'); //fputs($file, $data); file_put_contents($file, $data, FILE_BINARY); fclose($file); fputs and file_put_contents are not working. I created a sample php upload file with move_uploaded_file, and it works on the same uploading folder. fopen($image,'w+') actually create the image with 0 byte. I tried to...

PHP Codeigniter uploads failed with no errors

php,forms,codeigniter,file-upload
I want to upload a file using a registration form. I used File_Upload library of Codeigniter. But the file does not upload to the destination and no errors appears. This is just part of my code (All of them are really huge) Controller (seeker_register.php): public function submit(){ ... $this->load->model('mseeker_register'); $user_id...