|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Multiple file upload php
Hi,
following problem/task/wished feature Iīm working on (long time): Is it possible to upload multiple files through a web form? I want to avoid everyone editing a article in my cms, uploading the pics he needs per ftp first. There is a way by zipping them first, I know, but I want to adapt the <form type=file> for adding not only a certain number (by using the "value=file[]" section but by adding n entries to the HTTP_POST_FILES variable from a local directory! Is there any possibility out there or have I to prog a workaround like zipping them first? Thanks in advance for your answers! |
|
#2
|
|||
|
|||
|
you can use multipe file fields, as an array and them process them
eg <form type='file' name='file[]'> <form type='file' name='file[]'> <form type='file' name='file[]'> <form type='file' name='file[]'> then using php to process them $file = $_FILES['file']; for($i = 0; $i < sizeof($file); $i++) { if($file['error'] == 0) //if a file was uploaded in this field { //processing data here } } |
|
#3
|
|||
|
|||
|
Thatīs exactly what I meant by "adding n entries" and not a certain number of files. Think of following example.
Image Gallery, one user with authorisation wants to add new pictures he made the day before. There are 200+ pictures. Normally he would upload them first on my/our server and then he could activate my script to transform them (in which way ever, not important for my example). Iīm searching for access to a local client, and I know thatīs not possible with php, but maybe we could think of other possibilities. Everyone heard of a ActiveX Script or something else that could access local client data?? But there must be a easy way of uploading multiple (or n) files throug a webbased form without using a ftp-program. Think of that case: You send a email with that 200+ pictures mentioned to the system and grab them automatically by a script that would be the same (Ok, Iīve to admit itīs a different protocol but who matters??). Why is it not possible to specify in a form a folder or directory and I can access this local folder and take each element like the dir() but in this case for local files.... Any ideas, suggestions, comments?? |
|
#4
|
|||
|
|||
|
new flash uploader
i don't know if anyone is interested by these new flash products but make a try at
flashuploaded dot com there are nice flash upload components to integrate easily in a website with a upload progress bar time remaining, file/folder manager etc... i tried it and works very well. thanks |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Multiple file upload php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|