6 of 6
6
LG SAEF File Upload…. Throwing my hat into the ring
Posted: 21 August 2008 05:53 AM   [ Ignore ]   [ # 91 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  881
Joined  02-15-2008

Levi, you are the daddy. This is absolutely what I need and it worked first time!

Just made yet another job that much easier. Beers are owed!

 Signature 

Andy Harris | Pepper Digital | Malvern, UK | Twitter | New to ExpressionEngine? Start here!
Remember - If at first you don’t succeed, you’re not Chuck Norris

Profile
 
 
Posted: 05 September 2008 10:54 AM   [ Ignore ]   [ # 92 ]  
Summer Student
Avatar
Total Posts:  11
Joined  07-25-2008

I just found a conflict with this extension (which I love) and Solspace’s onSubmit extension (which I kinda need).

I haven’t seen anyone report this yet, so I figured it might prove helpful. This is the first time I’ve experienced a conflict with extensions. 

The Behavior:
As soon as the onSubmit extension is enabled, the LG SAEF File Upload extension fails to do anything on the form—the hidden fields and enctype are missing. This is even if onSubmit is not being used on that SAEF form. The form still submits and the data saves, but no file uploads and the custom field will only show the filename, no path var.

I’m not sure what the conflict is exactly…that’ll have to wait.

[edit]
I found that by modifying the priority of the onSubmit extension to 9, it can co-exist with the LG SAEF File Upload extension.

Profile
 
 
Posted: 07 September 2008 02:10 AM   [ Ignore ]   [ # 93 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1076
Joined  01-24-2006

Hey DaveO,

I haven’t checked out Solspaces extension but I would hesitate to guess that it is not checking to see if anyone is modifying the data before the hook is executing the extension method.

Heres an example of my code:

/**
    * Modify the $data parameters before they are processed by the user side form creator
    *
    * @param    array    $data    The form data
    * @return    array            The form data
    * @since     Version 1.0.0
    * @see        http://expressionengine.com/developers/extension_hooks/form_declaration_modify_data/
    */
    
function form_declaration_modify_data($data)
    
{
        
global $EXT, $TMPL;
        
// -- Check if we're not the only one using this hook
        
if($EXT->last_call !== FALSE) $data = $EXT->last_call;
        
        
// check if the $TMPL is an object
        // on the traditional member pages this hook is called but there are no templates.
        
if(is_object($TMPL) === TRUE && $TMPL->fetch_param('lg_saef_file_upload') == 'y')
        
{
            $data[
'enctype']='multi';
            
$data['hidden_fields']['lg_saef_file_upload'] = 'y';
            
$data['hidden_fields']['lg_saef_file_upload_dir_id'] = $TMPL->fetch_param('lg_saef_file_upload_dir_id');
        
}
        
return $data;
    
}

You can see that I am checking if anyone else is using the hook first. If they are I’m using their data as a base for my extension. You may be able to modify Solspaces extension to do something similar.

Cheers

 Signature 

VOTE FOR LG Addons in the Mashable Open Web Awards!


Newism - Newcastle Web Design & Development


LG Better Meta now w/ Sitemap Meta & XML Generator | LG Polls | LG .htaccess Generator

Profile
 
 
Posted: 07 September 2008 02:01 PM   [ Ignore ]   [ # 94 ]  
Summer Student
Avatar
Total Posts:  11
Joined  07-25-2008

Leevi,

You’re exactly right, thanks for the heads up on that.

Dave

Profile
 
 
Posted: 07 September 2008 10:28 PM   [ Ignore ]   [ # 95 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1076
Joined  01-24-2006

No worries… don’t forget to notify Solspace on their forum about the issue. smile

 Signature 

VOTE FOR LG Addons in the Mashable Open Web Awards!


Newism - Newcastle Web Design & Development


LG Better Meta now w/ Sitemap Meta & XML Generator | LG Polls | LG .htaccess Generator

Profile
 
 
Posted: 07 September 2008 10:57 PM   [ Ignore ]   [ # 96 ]  
Summer Student
Avatar
Total Posts:  11
Joined  07-25-2008

Yep, I’ve already sent them an email and will follow up in the forums.

Profile
 
 
Posted: 07 September 2008 11:07 PM   [ Ignore ]   [ # 97 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1076
Joined  01-24-2006

Excellent.

 Signature 

VOTE FOR LG Addons in the Mashable Open Web Awards!


Newism - Newcastle Web Design & Development


LG Better Meta now w/ Sitemap Meta & XML Generator | LG Polls | LG .htaccess Generator

Profile
 
 
Posted: 12 September 2008 11:49 AM   [ Ignore ]   [ # 98 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  157
Joined  09-06-2006

I’m having the same issue as this one. The directory tag is showing. Seems to have something to do with Mark Hout’s File field which I’m using. I’ve tried switching to a regular text field with no formatting, but it shows in the SAEF, where this doesn’t for some reason.

 Signature 

Kyle Summer | smartpill design | New Haven, CT

Profile
 
 
Posted: 28 September 2008 09:34 AM   [ Ignore ]   [ # 99 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  216
Joined  11-04-2002

Is there any way to get the Edit part of this working in the Admin Panel as well?

I’m using this for a weblog where data is entered via the SAEF, but edited via the normal control panel. And at the moment in the control panel, my SAEF file field just shows up as a text box, with no way to re-upload a file. It’d be great if this had the same functionality in the SAEF as in the control panel!

 Signature 

stillburning.com | fever of fate

Profile
 
 
Posted: 28 September 2008 05:07 PM   [ Ignore ]   [ # 100 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1076
Joined  01-24-2006
Sasha - 28 September 2008 09:34 AM

Is there any way to get the Edit part of this working in the Admin Panel as well?

I’m using this for a weblog where data is entered via the SAEF, but edited via the normal control panel. And at the moment in the control panel, my SAEF file field just shows up as a text box, with no way to re-upload a file. It’d be great if this had the same functionality in the SAEF as in the control panel!

At the moment there are no plans to add this functionality to the backend CP. Generally I just use the normal file upload which works well although it does not provide a preview. :(

 Signature 

VOTE FOR LG Addons in the Mashable Open Web Awards!


Newism - Newcastle Web Design & Development


LG Better Meta now w/ Sitemap Meta & XML Generator | LG Polls | LG .htaccess Generator

Profile
 
 
Posted: 06 October 2008 12:14 PM   [ Ignore ]   [ # 101 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  157
Joined  09-06-2006

For some reason, the “browse” button (or my form “submit” button, for that matter) isn’t clickable in Firefox 2 for Windows. I haven’t been able to test on a Mac, but FF3 works fine. Has anyone else experienced this or have a clue what the fix might be?

 Signature 

Kyle Summer | smartpill design | New Haven, CT

Profile
 
 
Posted: 07 October 2008 09:36 PM   [ Ignore ]   [ # 102 ]  
Lab Assistant
RankRank
Total Posts:  271
Joined  07-04-2007

BUG:  If a user doesn’t supply a required field or the title the file uploads anyway and then the form throws out an error.  So then the user fills the required field and the file gets duplicated on the server again when they click submit.  This is a problem for me because i’m using this to upload fairly large files.

Anyone have any ideas how this can be fixed?

Profile
 
 
Posted: 12 October 2008 09:50 PM   [ Ignore ]   [ # 103 ]  
Summer Student
Total Posts:  14
Joined  01-01-2008

Let me first say that I really love this extension. I first implemented it several weeks ago, and it has been working great except for this little problem…

If a user uploads a file with a space in it, such as “My File.doc”, EE converts the filename to “My_File.doc” but the extension still saves “My File.doc” to the database. Is there anyway to get the data saved to the database by the extension to go through the same filename encoding as the actual file that was uploaded?

Profile
 
 
Posted: 12 October 2008 10:03 PM   [ Ignore ]   [ # 104 ]  
Lab Assistant
RankRank
Total Posts:  271
Joined  07-04-2007
Jaycee - 12 October 2008 09:50 PM

Let me first say that I really love this extension. I first implemented it several weeks ago, and it has been working great except for this little problem…

If a user uploads a file with a space in it, such as “My File.doc”, EE converts the filename to “My_File.doc” but the extension still saves “My File.doc” to the database. Is there anyway to get the data saved to the database by the extension to go through the same filename encoding as the actual file that was uploaded?

If i upload “my file.xyz” through a SAEF the extension saves it as “my_file.xyz” to the server, and in the database/weblog field it’s stored as “{filedir_1}my_file.xyz”.

So it does what you want it to do for me!

Profile
 
 
Posted: 22 October 2008 09:05 PM   [ Ignore ]   [ # 105 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  283
Joined  12-22-2003

Leevi,

This is a brilliant extension and does exactly what I needed.

Thanks a million!

Profile
 
 
Posted: 29 October 2008 06:19 PM   [ Ignore ]   [ # 106 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  570
Joined  10-14-2005

What a brilliant extension, as you already know, delete is the killer extra feature. Incidentally what is the expected behavior if you choose to upload a new file, will this be uploaded using the same file name as the original upload (thus helping to reduce the number of orphan files in the upload directory) or will it just ignore the previously uploaded file and upload the new file and change the string in the DB?

It would be nice to have an option to have the files renamed with a unique file name that relates to the entry id and custom field id. smile

 Signature 

Nathan Pitman

Nine Four Ltd - a member of the EEPro Network

Profile
 
 
Posted: 20 November 2008 03:47 PM   [ Ignore ]   [ # 107 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  313
Joined  05-26-2004

Has anyone had problems with this since 1.6.6? I don’t know about 1.6.5 because I went from 1.6.4 direct to 1.6.6.

My symptom is that since the upgrade, the files do not upload, but the upload field is populated. This has just been noticed, so I have not had time to trace further.

If anyone can replicate, I would be obliged.

Edit: Sorry, not correct, it does upload, but something has changed affecting my downstream code since I upgraded. Please ignore while I trace further.

 Signature 

...for there is no way to reduce a hunter to economic dependence and make him hunt for you - Albert Jay Nock ~ “Our Enemy the State”

Profile
 
 
Posted: 20 November 2008 06:05 PM   [ Ignore ]   [ # 108 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  313
Joined  05-26-2004

I have traced this problem down to where tags are appearing around the contents of the upload field. The field type is set to text and the format is set to “None”

This is not the only field affected, the same thing is happening in textareas with format set to “None”

So this has nothing to do with LG SAEF Upload - I will report to tech support.

 Signature 

...for there is no way to reduce a hunter to economic dependence and make him hunt for you - Albert Jay Nock ~ “Our Enemy the State”

Profile
 
 
   
6 of 6
6
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64909 Total Logged-in Users: 46
Total Topics: 81853 Total Anonymous Users: 30
Total Replies: 440068 Total Guests: 227
Total Posts: 521921    
Members ( View Memberlist )