Is it possible to upload multiple images at once and showed them in the table.
Thanks in advance,
Wilfredo
Uploading multiple images in one submit
Re: Uploading multiple images in one submit
At present you can only load a single image to each image upload field but you can certainly have multiple image upload fields per table and upload multiple images at the same time.
The thing you have to be cautious of is that the upload file size limits you set/load when uploading multiple images are not going exceed your servers max upload limit or php timeout or they will just fail - not because of Appgini but because of your server limitations.
For many images, I have resorted to a document upload field and included ZIP in the permitted file types. That way you can compress an entire folder and load it as just one downloadable file. Works well. Only downside of course is that you don't see the pretty image thumbnails that you do with single images but it's a lot quicker and easier.
The thing you have to be cautious of is that the upload file size limits you set/load when uploading multiple images are not going exceed your servers max upload limit or php timeout or they will just fail - not because of Appgini but because of your server limitations.
For many images, I have resorted to a document upload field and included ZIP in the permitted file types. That way you can compress an entire folder and load it as just one downloadable file. Works well. Only downside of course is that you don't see the pretty image thumbnails that you do with single images but it's a lot quicker and easier.
Re: Uploading multiple images in one submit
Thank you Peebee for your response.
I have found this: http://www.thesoftwareguy.in/upload-mul ... php-mysql/ I will try it and let you know if this fuctioned with my app.
Thank you again.
Wilfredo
I have found this: http://www.thesoftwareguy.in/upload-mul ... php-mysql/ I will try it and let you know if this fuctioned with my app.
Thank you again.
Wilfredo
Re: Uploading multiple images in one submit
I have resolved this with the help of Uday Vatturi. He is very skilled and solved this with a really simple code. Just in case anyone needs a solution fast and easy.
-
- Veteran Member
- Posts: 30
- Joined: 2015-05-12 13:05
Re: Uploading multiple images in one submit
Can you please share this code for multiple image upload? Thanks.
Re: Uploading multiple images in one submit
Hi,
I have found a workaround for uploading multiple images when populating my database at the start. Its not perfect as you don't get the thumbnail of each image just a camera icon.
I populated my table records using the import csv tool making sure I had added the image file names in the image column prior to import. I then uploaded the image files into the image folder on my website using FileZiller or similar. It would be really great if something for doing this was made available on the application.
I have found a workaround for uploading multiple images when populating my database at the start. Its not perfect as you don't get the thumbnail of each image just a camera icon.
I populated my table records using the import csv tool making sure I had added the image file names in the image column prior to import. I then uploaded the image files into the image folder on my website using FileZiller or similar. It would be really great if something for doing this was made available on the application.
-
- Posts: 1
- Joined: 2015-08-12 14:40
Re: Uploading multiple images in one submit
Hello, I'm also in great need of this functionality, so you can send multiple files to me solve many problems I'm having now, to be honest solve about 80% since bought thinking that had this functionality. Do you have any plans to have this functionality? I'm loving the Software, congratulations to the developers.
Wender
Wender
-
- AppGini Super Hero
- Posts: 85
- Joined: 2014-06-14 03:08
- Location: India
- Contact:
Re: Uploading multiple images in one submit
Hi,
Here is the working sample.
http://test.spgon.in/property/index.php
If someone needs it please PM me.
Here is the working sample.
http://test.spgon.in/property/index.php
If someone needs it please PM me.
-
- Posts: 2
- Joined: 2015-11-23 10:24
- Location: Chicago
- Contact:
Re: Uploading multiple images in one submit
I have just start using this software and hoping that developer will consider this and allow users to post multiple images in one submit which will quite beneficial for all of us.
-
- Posts: 3
- Joined: 2015-10-31 18:33
Re: Uploading multiple images in one submit
you can inspect the input tag and add tag multiple
<input type="file" name="image[]" multiple="multiple" id="image" />
then add for loop like that
<input type="file" name="image[]" multiple="multiple" id="image" />
then add for loop like that
Code: Select all
foreach ( $_FILES['image']['tmp_name'] as $key => $val ) {
//code as a single image code
}
-
- Posts: 1
- Joined: 2016-04-06 13:07
- Location: chennai
- Contact:
Re: Uploading multiple images in one submit
We can upload multiple image in the basis of PHP form with one input.
<?php
include("../include/session.php");
session_start();
$allowedExts = array("jpeg", "jpg", "png", "gif");
$extension = end(explode(".", $_FILES["upload"]["name"]));
if(isset($_FILES['upload']['tmp_name']))
{
for($i=0; $i < count($_FILES['upload']['tmp_name']);$i++)
{
if (($_FILES["upload"]["name"] < 90000000000000000)
&& in_array($extension, $allowedExts)) {
if ($_FILES["upload"]["error"] > 0)
{
header('location: '.$error); die;
}
else
{
if (file_exists("../icons/".$_SESSION["username"] ."/" . $_FILES["upload"]["name"]))
{
echo "error";
}
else
{
if(!is_dir("../icons/". $_SESSION["username"] ."/")) {
mkdir("../icons/". $_SESSION["username"] ."/");
}
$temp = explode(".",$_FILES["upload"]["name"]);
$file = rand(1,999999999999) . '.' .end($temp);
move_uploaded_file($_FILES["upload"]["tmp_name"], "../icons/". $_SESSION["username"] ."/". $file);
}
}
}
} else {
echo "yep error";
}
}
}
?>
<?php
include("../include/session.php");
session_start();
$allowedExts = array("jpeg", "jpg", "png", "gif");
$extension = end(explode(".", $_FILES["upload"]["name"]));
if(isset($_FILES['upload']['tmp_name']))
{
for($i=0; $i < count($_FILES['upload']['tmp_name']);$i++)
{
if (($_FILES["upload"]["name"] < 90000000000000000)
&& in_array($extension, $allowedExts)) {
if ($_FILES["upload"]["error"] > 0)
{
header('location: '.$error); die;
}
else
{
if (file_exists("../icons/".$_SESSION["username"] ."/" . $_FILES["upload"]["name"]))
{
echo "error";
}
else
{
if(!is_dir("../icons/". $_SESSION["username"] ."/")) {
mkdir("../icons/". $_SESSION["username"] ."/");
}
$temp = explode(".",$_FILES["upload"]["name"]);
$file = rand(1,999999999999) . '.' .end($temp);
move_uploaded_file($_FILES["upload"]["tmp_name"], "../icons/". $_SESSION["username"] ."/". $file);
}
}
}
} else {
echo "yep error";
}
}
}
?>