DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Multiple file upload  
DwZone Forum Index -> Multiple file upload
.
Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 141 to 148 of 148 (Total: 146) First |  Prev |  Next |  Last  
 Subject Author Date  
   Re: Save only the file name in the database  
View this persons public profile  Gianluigi   9:55 20 Apr 2015  
   upload type  
View this persons public profile  PaulMaher   16:57 3 Mar 2015  
   Re: upload type  
View this persons public profile  Gianluigi   0:03 4 Mar 2015  
   tutorial for ths function  
View this persons public profile  Allan   22:47 10 Feb 2015  
    Re: tutorial for ths function  
View this persons public profile  Allan   8:09 11 Feb 2015  
 
perhaps you can help me out.
What is happening is:
The upload is going well but the insert in the table (see below) isn't.
Now it is creating 2 rows. see the example below


this is the table


d_r_o_p TABLE IF EXISTS `tbl_albums`;
CREATE TABLE IF NOT EXISTS `tbl_albums` (
`albumid` int(11) NOT NULL AUTO_INCREMENT,
`galleryid` int(4) NOT NULL,
`groepspageid` int(4) NOT NULL,
`fotogroot` varc_h_a_r(500) COLLATE utf8_unicode_ci NOT NULL,
`fotoklein` varc_h_a_r(500) COLLATE utf8_unicode_ci NOT NULL,
`toegevoegd` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`albumid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=56 ;

--
-- Gegevens worden uitgevoerd voor tabel `tbl_albums`
--

INSERT INTO `tbl_albums` (`albumid`, `galleryid`, `groepspageid`, `fotogroot`, `fotoklein`, `toegevoegd`) VALUES
(54, 1, 4, '', '', '2015-02-11 17:38:49'),
(55, 54, 0, 'root/DSC_0426.JPG', 'root/DSC_0426_m.JPG', '2015-02-11 17:38:49');


Then the code generated by your extension:
(galleryid & groepspageid = vars in the code )



set_time_limit(20000);
$dwzUpload_1 = new dwzMultiUpload();
$dwzUpload_1->SetInstance("1");
$dwzUpload_1->SetExtraInfo("Green|_|5400|_|block|_|500,150|_|false|_|AddImages@__@galleryid@__@hidden,AddImages@__@groepspageid@__@hidden");
$dwzUpload_1->SetRedirectUrl("#");
$dwzUpload_1->SetPath("/the/root/|_|1");
$dwzUpload_1->SetTempPath("/the/root/temp|_|1");
$dwzUpload_1->TestEnvironment();
$dwzUpload_1->Init();
$dwzUpload_1->SetRootPath("");
$dwzUpload_1->SetConnPar(@$hostname_deh, @$database_deh, @$username_deh, @$password_deh);
$dwzUpload_1->SetTexts("<b>Multiple upload files</b>|_|Upload|_|Start upload files|_|Remove all|_|Remove queued files|_|Stop|_|Stop upload process|_|Total progress|_|Total file size|_|Uploaded size|_|Time elapsed|_|Time remaining|_|Total speed|_|Current speed");
$dwzUpload_1->SetMessages("The file cannot be removed|_|Upload in progress|_|Upload complete|_|Remove file from queue|_|SwfUpload not defined|_|No files selected|_|Upload complete with error|_|Total file size exceed limit");
$dwzUpload_1->SetButtonParameters("/dwzMultipleUpload/Graphics/Green/BrowseButton.png|_|110|_|20|_|Browse...|_|font-family:Arial, Helvetica, sans-serif;font-size:12px;font-weight:bold;|_|font-family:Arial, Helvetica, sans-serif;font-size:12px;font-weight:bold;color:#cccccc;|_|20|_|3");
$dwzUpload_1->SetOverwriteMode("0");
$dwzUpload_1->SetAllowedExtensions("*.gif|_|*.jpg|_|*.jpeg|_|*.png|_|*.bmp");
$dwzUpload_1->SetAllowedExtensionsDescription("Gif Images|_|Jpg Images|_|Jpeg Images|_|Png Images|_|Bmp Images");
$dwzUpload_1->SetSizes("0,0,0");
$dwzUpload_1->SetInsertParameters("1|_|AddImages|_|tbl_albums|_|galleryid@_@galleryid@_@Integer@_@N@_@@_@@_@@_@@_@@_@|@|groepspageid@_@groepspageid@_@Integer@_@N@_@@_@@_@@_@@_@@_@|_|1|_|tbl_albums|_|galleryid|_|galleryid|_|fotogroot|_|fotoklein|_||_||_||_||_||_||_||_|deh");
$dwzUpload_1->SetResizeParameters("0|_|1|_|600|_|400|_|100|_|1|_|1|_|320|_|160|_|100|_|1|_|_m|_|2|_|0|_||_||_|80|_|1|_|_s|_|2");
if($dwzUpload_1->IsPostBack()){
$dwzUpload_1->Save();
}

 
Reply to this current thread  View this persons public profile  Send Private Message
   Re: tutorial for ths function  
View this persons public profile  Gianluigi   9:54 11 Feb 2015  
   Problem with dynamic Upload Folder  
View this persons public profile  MDS   7:05 10 Apr 2014  
   Re: Problem with dynamic Upload Folder  
View this persons public profile  Gianluigi   10:04 10 Apr 2014  
Last Visit: Thursday 28 Mar, 2024 11:01 pm First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-1

Jump to: