We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG SAEF File Upload.... Throwing my hat into the ring

Development and Programming

walpow's avatar
walpow
133 posts
17 years ago
walpow's avatar walpow

Leevi, you rock. That did it. It’s working like it should.

After spending all day wading through gigantor threads, trying out a few things, and finally deciding everything available was too complicated and I’d wait to see what 2.0 had to offer before letting users upload files, I stumbled upon this. Simple, elegant, to the point.

One quick question: I had to go into the SQL Manager and look at exp_weblog_fields to find the field_id. Is it anywhere in the “normal” part of the control panel?

Thanks a million, Nathan

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

You can find it in a couple of places… I just look at the URL when I edit a custom field.

Glad it works… Now if we can only figure out dannys problem :(

@Danny, can you double check your field_id?

Cheers Guys

       
walpow's avatar
walpow
133 posts
17 years ago
walpow's avatar walpow
I just look at the URL when I edit a custom field.

Aha! Fabulous.

Thanks again, Nathan

       
Danny T.'s avatar
Danny T.
426 posts
17 years ago
Danny T.'s avatar Danny T.

Leevi,

Haven’t played around with this for a while.. But I did a clean install and everything seems to be working as advertised.. Weird.

Thanks for the great upload! Now if only I can somehow figure out how to pull off an AJAX preview. 😊

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

YAY!!!! That’s two confirmed… seems like we have a winner. 😊

       
Danny T.'s avatar
Danny T.
426 posts
17 years ago
Danny T.'s avatar Danny T.

Thanks for the great work man.. Without your modules, I wouldn’t be anywhere near as efficient (or inefficient, however you look at it.. Either way, it’s better than had I not had them). 😊 This is great.. I can’t believe it took so long for someone to push something out like this, but I’m glad you took a stab at it man!

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

It wasn’t really a hard extension to build but it has laid the ground work for something new and exciting I’m working on. Cna’t say much now… but its coming along nicely

       
Danny T.'s avatar
Danny T.
426 posts
17 years ago
Danny T.'s avatar Danny T.

You devil.. I knew you had something up your sleeve that I’ll likely end up using. 😊

       
Adam George's avatar
Adam George
283 posts
17 years ago
Adam George's avatar Adam George

Leevi - What type of custom field does the custom field have to be? Text?

       
mmcclung's avatar
mmcclung
172 posts
17 years ago
mmcclung's avatar mmcclung

Hey, Leevi–

cool functionality, though i’m hitting a speedbump; I can upload a file successfully to right directory, but the custom field entry in my weblog is now

https://ellislab.com/asset/images/ent-partner-work/foo_file.aif

with the curlybraces and all. is this expected behavior?

end goal is to able to {exp:extract_url} the filename for other users to download, but right now that plugin seems to gack on the curlybraces in my custom field.

       
Joobs's avatar
Joobs
362 posts
17 years ago
Joobs's avatar Joobs
Hey, Leevi– cool functionality, though i’m hitting a speedbump; I can upload a file successfully to right directory, but the custom field entry in my weblog is now
https://ellislab.com/asset/images/ent-partner-work/foo_file.aif
with the curlybraces and all. is this expected behavior? end goal is to able to {exp:extract_url} the filename for other users to download, but right now that plugin seems to gack on the curlybraces in my custom field.

The https://ellislab.com/asset/images/ent-partner-work/ is correct, EE automatically will parse that to display the correct folder.

When you output the custom field to a template does it display “http://www.example.com/upload_folder/filename.ext”? or does it show “https://ellislab.com/asset/images/ent-partner-work/filename.ext”?

have you also tried using extract url plus 2?

       
mmcclung's avatar
mmcclung
172 posts
17 years ago
mmcclung's avatar mmcclung

it shows “https://ellislab.com/asset/images/ent-partner-work/filename.ext”

{exp:ee_typography format=none} extracts the URL successfully (not sure why {exp:extract_url} failed, but there you go).

{exp:phpstringfun function="ltrim" par1="https://ellislab.com/asset/images/ent-partner-work/"} makes the field presentation-pretty.

big props to leevi for another useful hunk o’ code

       
CI Lee's avatar
CI Lee
343 posts
17 years ago
CI Lee's avatar CI Lee

Hey Levi,

I am currently using this extension as it is downloaded today.

Here is my form and I am getting “Your section entry must have a title.”

{if logged_out}
                <h1>Become a Friend</h1>
                {embed="friends/register_form"}
                {/if}

                {if logged_in}
                <h1>Hi {screen_name}!</h1>
                How goes it?
                Would you like to <a href="/submit">submit a design</a>
                
                <div id="saef-holder">
                    {exp:weblog:entry_form weblog="friend_submissions" return="/worked" status="pending" lg_saef_file_upload = "y" lg_saef_file_upload_dir_id = "1"}
                    
                    <label>Name of project: <span class="required">*</span></label>
 
                    <input type="text" name="{title}" value="{title}" class="input" id="{title}" size="40" /><br >
                    
                    <label>Project Package: </label>
 
                    <span class="instructions">Zip of project</span>
                    <input type="file" name="field_id_4" class="input" value=""/><p >
                                    
                    {custom_fields}
                    
                    {if textinput}
                    <label>{field_label}: <span class="required">*</span></label>
 
                    <span class="instructions">{field_instructions} </span>
                    <input type="text" name="{field_name}" value="" class="input" id="{field_name}" size="40" /><br >
                    
                    {/if}
                    
                    {if textarea}
                    <label>{field_label}: <span class="required">*</span></label>
 
                    <span class="instructions">{field_instructions} </span>
                    <textarea name="{field_name}" id="{field_name}" rows="{rows}" cols="50">{field_data}</textarea>
                    {/if}
                    
                    
                    
                    {/custom_fields}
                    
                    <input type="submit" name="submit" value="Submit" />
                    {/exp:weblog:entry_form}

Can you tell me where I am going wrong?

Thanks -Lee

       
CI Lee's avatar
CI Lee
343 posts
17 years ago
CI Lee's avatar CI Lee

Figured it out.

It is conflicting with the custom fields. If I manually input the ids and fields its fine.

Thanks!

-Lee

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham
Leevi - What type of custom field does the custom field have to be? Text?

Yep a text field will be perfect.

       
First 2 3 4 5 6 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.