Uploading multiple images in one submit

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
wilmira
Veteran Member
Posts: 67
Joined: 2013-07-11 18:00

Uploading multiple images in one submit

Post by wilmira » 2015-05-08 21:57

Is it possible to upload multiple images at once and showed them in the table.

Thanks in advance,

Wilfredo

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 352
Joined: 2013-03-21 04:37

Re: Uploading multiple images in one submit

Post by peebee » 2015-05-09 00:49

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.

wilmira
Veteran Member
Posts: 67
Joined: 2013-07-11 18:00

Re: Uploading multiple images in one submit

Post by wilmira » 2015-05-11 14:55

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

wilmira
Veteran Member
Posts: 67
Joined: 2013-07-11 18:00

Re: Uploading multiple images in one submit

Post by wilmira » 2015-05-21 15:09

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.

table_otto
Veteran Member
Posts: 30
Joined: 2015-05-12 13:05

Re: Uploading multiple images in one submit

Post by table_otto » 2015-05-26 14:32

Can you please share this code for multiple image upload? Thanks.

Melroy
Posts: 22
Joined: 2015-06-10 12:59

Re: Uploading multiple images in one submit

Post by Melroy » 2015-08-10 13:26

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.

interwender
Posts: 1
Joined: 2015-08-12 14:40

Re: Uploading multiple images in one submit

Post by interwender » 2015-08-12 14:42

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

udayvatturi
AppGini Super Hero
AppGini Super Hero
Posts: 85
Joined: 2014-06-14 03:08
Location: India
Contact:

Re: Uploading multiple images in one submit

Post by udayvatturi » 2015-08-17 12:56

Hi,
Here is the working sample.

http://test.spgon.in/property/index.php


If someone needs it please PM me.

KyleRonnie
Posts: 2
Joined: 2015-11-23 10:24
Location: Chicago
Contact:

Re: Uploading multiple images in one submit

Post by KyleRonnie » 2015-12-08 06:26

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.

ahmed hamdy
Posts: 3
Joined: 2015-10-31 18:33

Re: Uploading multiple images in one submit

Post by ahmed hamdy » 2015-12-18 18:49

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

Code: Select all

foreach ( $_FILES['image']['tmp_name'] as $key => $val ) {

//code as a single image code
}

kavipriya2691
Posts: 1
Joined: 2016-04-06 13:07
Location: chennai
Contact:

Re: Uploading multiple images in one submit

Post by kavipriya2691 » 2016-04-06 13:11

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";
}
}
}
?>

Post Reply