Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 1. Nov 2024, 04:19

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Error uploading file
PostPosted: 14. Jul 2010, 19:47 
Offline

Joined: 20. Jun 2010, 06:49
Posts: 11
Location: Bristol, TN
I'm trying to implement my own code into a section of tfu_upload.php that will auto-delete old files and notify the user in an email of when their files will be deleted. However, when I try to upload a file I get the message in JFU "Upload failed: 1 file(s) of 1 could not be uploaded". So I turned on debug mode and viewed the log to see where the problem occurred. With the following result:
Code:
07.14.2010 13:31:23 - 1. Config loaded
07.14.2010 13:31:23 - 2. Authenification sucessfull
07.14.2010 13:31:23 - 3. Directory read: ./__/__/__/__/JFU_UserDocs/testacct
07.14.2010 13:31:23 - 4. Check valid extension: test.txt
07.14.2010 13:31:23 - 4a. Extension valid.
07.14.2010 13:31:23 - 5. Before move_uploaded_file : /tmp/phpzChWW8 -_ ./__/__/__/__/JFU_UserDocs/testacct/test.txt
07.14.2010 13:31:23 - 5a. after move_uploaded_file.
07.14.2010 13:31:23 - 6. Uploaded.
07.14.2010 13:31:23 - 7. Internal processing done.
07.14.2010 13:31:23 - 8. Execute plugin: a_prefix_plugin.php
07.14.2010 13:31:23 - 8. Execute plugin: db_plugin.php
07.14.2010 13:31:23 - 8. Execute plugin: form_plugin.php
07.14.2010 13:31:23 - ERROR 8 in oomla_flash_uploader/tfu/form_plugin.php, line 25: Undefined index: select


I have not modified form_plugin.php at all, but here is the code in it:
Code:
<?php
/**
 * TWG Flash uploader 2.9.x
 *
 * Copyright (c) 2004-2009 TinyWebGallery
 * written by Michael Dempfle
 *
 * Description: This is a basic stub how to read a form field and write it to the log.
 *
 * Feel free to adopt this to your needs. 
 * The description line is shown in the backend of JFU in the next version! 
 */

defined('_VALID_TWG') or die('Direct Access to this location is not allowed.');

/**

 * 
 **/
function form_plugin_process_upload_file($folder, $fullpath ,$filename) {

$username = (isset($_SESSION['TFU_USER'])) ? $_SESSION['TFU_USER'] : $_SERVER['REMOTE_ADDR'];

// this is the form field from the example page.
$lang_select = parseInputParameter($_GET['select']);

// this is the debug function of TFU - the output is written to tfu.log. Values are seperated by |
debug($username . ' | ' . $filename . ' | ' . $folder . ' | ' . $fullpath . ' | lang=' . $lang_select);
}
?>


line 25 is:
Code:
$lang_select = parseInputParameter($_GET['select']);


I'm not certain that I need this plugin at all as it seems to be something to do with implementing extra values passed from an html form. I'm not passing any extra values into JFU at all, so I'm not certain I need this. However, I don't know how to disable it either if that is the case. This problem arises even after I reverted tfu_upload.php back to the original (before I made any changes). The strange thing is that the file still gets uploaded just with a different name, and it fails to email me the results as it has in the past. Any help is much appreciated.[/code]

_________________
Rob.Burdine@reportsolutions.com
919-272-1400


Top
 Profile  
 
 Post subject:
PostPosted: 14. Jul 2010, 22:12 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
This plugin only works IF you have configured JFU like described in the howto. So delete this plugin if you don't.

I'm currently writing a plugin for TFU where old files or files are deleted if you reach a certain number of files.

It's not released yet. But if you like I can send it to you if you like.

- Michael


Top
 Profile  
 
PostPosted: 14. Jul 2010, 22:41 
Offline

Joined: 20. Jun 2010, 06:49
Posts: 11
Location: Bristol, TN
Please do. Thank you sir. I assume it is ready all we need to do is configure JFU as described in the How To ?

So it is only based on the number of files ......not a time limit (like 7 days old) or the size of files?

Is what I have close and the How To you speak of is number "15" correct.

_________________
Rob.Burdine@reportsolutions.com
919-272-1400


Top
 Profile  
 
 Post subject:
PostPosted: 14. Jul 2010, 23:44 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
both - depends how you set the parameters.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 15. Jul 2010, 04:59 
Offline

Joined: 20. Jun 2010, 06:49
Posts: 11
Location: Bristol, TN
Thanks for the reply, the first reply fixed all the errors I was having.

_________________
Rob.Burdine@reportsolutions.com
919-272-1400


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy