Questions tagged as 'file-upload'

1
answer

Error saving data

I'm learning how to use Cakephp, and I'm trying to make a tool for uploading images using Cake 2.4.4. the problem is that only the modified and created fields are inserted into the database, although name and size sho...
asked by 20.05.2014 / 19:00
1
answer

PHP and Javascript - Help in file upload

I have on my client's site, which I assumed from another developer, a meeting and event registration section. In this section, I need to implement a PDF file upload field related to the event / meeting to be registered. I tried to implement b...
asked by 18.11.2015 / 18:00
1
answer

how to count number of input elements of html with php?

I need to count the number of input file elements because they are created dynamically at the click of a button <input class="tf" type="file" name="pic[]" accept="image/*"> This is the line that is created dynamically, but I n...
asked by 24.10.2015 / 20:58
1
answer

Primeface uploadFile + graphicImage: Upload image and display without refresh

I'm starting to program the jsf + primefaces . A long time ago I worked with JSP (java 1.4) and I'm kind of lost. I want to upload an image and have it displayed right below it. images.xhtml <?xml version="1.0" encoding="UTF-8"?&...
asked by 10.03.2015 / 15:59
2
answers

Limit file size

I created a file import method. I would like to know how to limit the file to the server.     
asked by 19.02.2016 / 03:24
2
answers

How do I upload an image that can be updated but remains with the same name? [closed]

Hello. As the title of the question itself says, I'd like to know how to upload a file in png, jpg or jpeg where its name is always kept as profilepic. in the [DOCUMENT_ROOT] directory / images. How to do this? I have tried to read some tutorial...
asked by 05.12.2016 / 21:29
2
answers

How to add the size of all files with JS

I have a input file that receives several files, but I only managed to get the size of the first one. I would like to know how to take the size of all and add in a variable; var sizeTotal = $("#inputfileSendTorrent")[0].files[0].size;...
asked by 02.03.2017 / 20:29
1
answer

How to protect file upload in php against shell script

How can I protect sending files with php against shell script, knowing that I only accept one type of extension.     
asked by 28.10.2016 / 03:35
1
answer

Setting the "upload_tmp_dir" folder of a cloud server

I'm trying to upload media to my server with a php code. I have refilled the code a few times and I believe there is absolutely nothing wrong with it. I researched the subject and saw that my upload_tmp_dir folder is set to no value...
asked by 05.12.2014 / 05:04
3
answers

PHP $ _FILES [''] is empty before validation [closed]

Good, I have a problem with my code, I have an image upload and I have defined that the size should be less than 2MB and 280 x 280 px. What happens is that when an image is uploaded $ _FILES ['avatar'] ['tmp_name'] ceases to exist, but onl...
asked by 28.08.2015 / 18:36