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 15. Nov 2024, 19:50

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  [ 10 posts ] 
Author Message
PostPosted: 29. May 2008, 16:51 
Offline

Joined: 29. May 2008, 16:48
Posts: 6
I am going to buy the registered version but I just wanted to ask how the uploaded file(s) information can be passed to a php script using the JS callback functions. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: 29. May 2008, 23:00 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
There are several ways.

First - the uploaded files are stored in the session in an array: TFU_LAST_UPLOADS - you could check this if you want.

If you want to trigger your php you can use the Javascript calback by using the plugin/mambot. There you can simply insert the needed Javascript code into the page you include the flash.

A working example (of the standalone version) can be found on the registered demo of TFU. But Javascript events do only work in the registered version.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 3. Jul 2008, 13:04 
Offline

Joined: 29. May 2008, 16:48
Posts: 6
All is working fine except that $_SESSION['TFU_LAST_UPLOADS'] is not available when the Javascript redirect happens after the upload.

If I print_r $_SESSION, other TFU items are there but not TFU_LAST_UPLOADS.

Please could you possibly help?

Thanks,

Mark.


Top
 Profile  
 
 Post subject:
PostPosted: 3. Jul 2008, 13:19 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
this is strange because I do use the TFU_LAST_UPLOADS when I verify if the upload was done properly.

How is the redirect triggered? Because the TFU_LAST_UPLOADS is removed if the info is again called from the flash (and this is when you select anything in the left view).

If you need this info longer I recommend to make a backup of this array at the end of tfu_upload.php (or you remove the line where I unset($_SESSION['TFU_LAST_UPLOADS']);

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 3. Jul 2008, 14:02 
Offline

Joined: 29. May 2008, 16:48
Posts: 6
Thanks for the prompt reply.

I tried commenting out that code but still no difference.

This is very strange, even if I add another line in tfu_upload.php :

$_SESSION['TFU_XXXXX'] = "1234567890";

This session array element does not appear either.

I am using the following code to redirect :

<script type="text/javascript">
function uploadFinished(loc) {
window.location.href="<?php echo JURL_BASE; ?>" + loc;
}
</script>

and loc is set to upload/uploadfinished.html in the config.


Top
 Profile  
 
 Post subject:
PostPosted: 3. Jul 2008, 14:13 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
where should it appear - you forward to an html page.

On the registered demo page you find a download where I do read the uploaded files from the server and display it below the flash.

Try to get this small example working. It should be enough to use your license file.

you can try use the internal session handling like TFU does (When the flash calles the tfu_upload.php some server give the flash a new session. I have several workarounds to avoid this and the "strongest" one is to handle the session by myself).
But this should be the last solution...

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 3. Jul 2008, 14:22 
Offline

Joined: 29. May 2008, 16:48
Posts: 6
I think that is what is happening - I am getting a new session.

The html page is actually an SEF url for my component.

Should I put a session_start in the component?


Top
 Profile  
 
 Post subject:
PostPosted: 3. Jul 2008, 14:58 
Offline

Joined: 29. May 2008, 16:48
Posts: 6
Actually, why do we need to start a new session when joomla already has a session anyway?

Could it be that we need to remove the session_start() from tfu_upload.php?


Top
 Profile  
 
 Post subject:
PostPosted: 3. Jul 2008, 16:47 
Offline

Joined: 29. May 2008, 16:48
Posts: 6
The example code is not for a Joomla installation, it is the Joomla Flash Uploader that I have purchased.

Kind Regards,

Mark.


Top
 Profile  
 
 Post subject:
PostPosted: 3. Jul 2008, 18:47 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I know. But JFU is only a wrapper for TFU. With the standalone version you can check if it is a server problem.

And you have to start the session in tfu_upload.php. This file is directly called by the flash. Not through Joomla.
This is why the session has to be passed.

/Michael


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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