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

DougH's avatar
DougH
205 posts
16 years ago
DougH's avatar DougH

Leevi,

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

Thanks a million!

       
Nathan Pitman's avatar
Nathan Pitman
531 posts
16 years ago
Nathan Pitman's avatar Nathan Pitman

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. 😊

       
JohnD's avatar
JohnD
114 posts
16 years ago
JohnD's avatar JohnD

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.

       
JohnD's avatar
JohnD
114 posts
16 years ago
JohnD's avatar JohnD

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.

       
The Simple Way's avatar
The Simple Way
13 posts
16 years ago
The Simple Way's avatar The Simple Way
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.

I’m having the same issue. I actually had a few others questions but decided to read through the entire thread and they were all cleared up except this one.

Thanks Leevi for developing this and everyone else for helping to work out all of my questions before I even arrived 😊

       
judin's avatar
judin
54 posts
16 years ago
judin's avatar judin

Hi Leevi

Great extension. I’m on 1.6.6 and am having a problem with certain image files. I have 10 upload fields, which certainly do work - but not always! And although files get uploaded, those over about 850KB don’t appear in the Admin entry form (but they do get uploaded into the FTP folder). Is this a bug? The file upload preferences had no limit set. I wonder therefore if a default limit gets added (hidden)? Images even slightly over this 850KB don’t appear!

Thanks, Justin

       
FrankJohnson's avatar
FrankJohnson
150 posts
16 years ago
FrankJohnson's avatar FrankJohnson

I’m having a very hard time getting this extension to work.

If I try to upload a small graphic (8 kilobytes), it works flawlessly - the file is uploaded to the correct directory, the entry to the weblog is completed, and the user is taken to the submitphotos template.

However, if I try and upload a larger flash video file (10 megabytes) - and the point of having SAEF file upload capability for this client is specifically to enable them to upload flash video files or mp3 files - the system appears to timeout. The file does not show up in the directory, the entry to the weblog is not completed, and the user is not taken to the submitphotos template (in fact, the SAEF simply reloads with no fields completed).

Is there a file size limitation?

EDIT: Turns out that the file size limitation is a limit imposed by DreamHost. In case Justin (who seems to be experiencing the same problem) is on Dreamhost, I followed the directions here and here to increase the allowed file size.

       
FrankJohnson's avatar
FrankJohnson
150 posts
16 years ago
FrankJohnson's avatar FrankJohnson

Now I’m having a different problem. Everything works perfectly - the file uploads to the correct directory and the entry is added to the weblog.

But the file reference looks like this:

http://www.example.com/media/briefmeditation15.flv

Instead, I need it to look like this:

briefmeditation15.flv

because my template has the file name appearing in the middle of a tag for the FLV Player plugin.

The text formatting for the field is set to None. If I can get it to return just the file name, that would be perfect. But if I could at least eliminate the paragraph tags and the space after the file extension, I’m guessing it would work.

Any thoughts?

EDIT: I was able to solve this using the FrankHTML Strip plugin. It left the trailing space, but mysteriously the Flash files now work even with the space.

Thanks, Frank

       
FrankJohnson's avatar
FrankJohnson
150 posts
16 years ago
FrankJohnson's avatar FrankJohnson

The next challenge I’m facing is to get the edit portion working. I’m trying to implement it in conjunction with a stand alone edit form “powered” by SolSpace’s form helper plugin. I’ve tried a number of things, but no matter what I try, the previously uploaded file doesn’t show up in the field.

Here’s my code:

{exp:weblog:entries weblog="default_site" status="not closed" show_expired="yes" rdf="off"}

{exp:weblog:entry_form weblog = "default_site" lg_saef_file_upload = "y" lg_saef_file_upload_dir_id = "2" return="site/index/"}

<input type="hidden" name="entry_id" value="{entry_id}" />
<input type="hidden" name="title" value="{title}" />
<input type="hidden" name="entry_date" value="{entry_date format='%Y-%m-%d %g:%i %A'}" />
<input type="hidden" name="category[]" value="{cat_id}" />

<span class="submit_subhead_img">/images/check.gif</span> <span class="submit_subhead"><strong>STEP 1: SPECIFY A TITLE FOR YOUR ENTRY</strong></span>

<strong>Title</strong>

<input type="text" name="title" value="{title}" class="saeftextfield" maxlength="100" /></p>

<strong>Body (required)</strong>

{formatting_buttons}
<textarea name="{exp:form_helper:field_grabber field_name='body'}" value="{body}" rows="10" class="saeftextarea">{exp:form_helper:field_parser parse="<p>|</p>"}{body}{/exp:form_helper:field_parser}</textarea></p>

<strong>Extended Text (optional)</strong>

{formatting_buttons}
<textarea name="{exp:form_helper:field_grabber field_name='extended'}" value="{extended}" rows="10" class="saeftextarea">{exp:form_helper:field_parser parse="<p>|</p>"}{extended}{/exp:form_helper:field_parser}</textarea></p>

<span class="submit_subhead_img">/images/check.gif <span class="submit_subhead"><strong>STEP 3: UPLOAD OPTIONAL MEDIA FILES</strong></span>

You may upload a flash video file or an .mp3 audio file to be included in your home page article.

Flash Video File (optional)

<input type="file" name="field_id_5" value="" size="107" class="saeftextfield" />
<input type="hidden" name="field_id_5" value="{flashvideofilename}" /></p>

MP3 Audio File (optional)

<input type="file" name="field_id_7" value="" size="107" class="saeftextfield" />
<input type="hidden" name="field_id_7" value="{audiofilename}" /></p>

<span class="submit_subhead_img">/images/check.gif <span class="submit_subhead"><strong>STEP 4: ADD A SHORT DESCRIPTION FOR YOUR ENTRY</strong></span>

Description (required)

<textarea name="{exp:form_helper:field_grabber field_name='summary'}" value="{summary}" rows="5" class="saeftextarea" />{summary}</textarea></p>

<span class="submit_subhead_img">/images/check.gif <span class="submit_subhead"><strong>STEP 5: ADD KEYWORDS FOR YOUR ENTRY</strong></span>

Keywords (required)

<input type="text" name="{exp:form_helper:field_grabber field_name='keywords'}" value="{keywords}" class="saeftextfield" maxlength="256" /></p>

<input type="submit" name="submit" value="Submit" />

{/exp:weblog:entry_form}

{/exp:weblog:entries}

Does anyone see anything which is obviously wrong?

Thanks, Frank

       
LynneL's avatar
LynneL
239 posts
16 years ago
LynneL's avatar LynneL

Two problems, which I think are related…and maybe not in the scope of this extension…

The first is that I am using Huot’s File extension, so the custom field in question that I want to upload to via my SAEF is a File type instead of Text Input.

So the output in CP for that field when I go to edit the entry is https://ellislab.com/asset/images/pronet-logo/file.jpg, and of course I can do nothing with it (view it, etc) because it’s not a real filepath.

Second, the resizing/renaming settings on the File Upload Prefs for the directory I’m using are not working. Files are neither being renamed nor resized (I just get the “error” message from EE saying the image is too long/wide). Is that due to this custom field being a File type? Or something else?

Do I have to make the custom field a text input field for this extension to work? I saw it somewhere in the thread that that’s the field type this is meant to work with but I have existing entries that have been using the File type (entered in on the CP) and so switching is sort of a problem…plus I want the admin user to be able to do this via CP.

I’m on 1.6.7 and using LG SAEF File Upload (v.1.0.0)

       
Todd D.'s avatar
Todd D.
460 posts
16 years ago
Todd D.'s avatar Todd D.
Would there be any way to store files in sub directories based on user ID? I am thinking for community based sites where lots of members will be uploading content, giving each member their own sub directory would make things much neater.
Hmm maybe… but probably not. At the moment the extension obeys the file upload prefs you set in the admin. Actually thinking on the fly maybe I could add this in as an option…
lg_file_upload_sub_folder = '{member_id}'
That would work ok I guess. 😊

Anybody try to get this to work… an upload directory per user?

       
DougH's avatar
DougH
205 posts
16 years ago
DougH's avatar DougH

How can I style the input field?

style= and class= are not working.

       
tvruwink's avatar
tvruwink
22 posts
about 16 years ago
tvruwink's avatar tvruwink

I am using the LG SAEF upload extension with a customized SAEF form. I can upload an image without any problem. However, when I call the weblog tag on my display page, all I get is an http link formatted with:

If I clear the https://pagingstaging.expressionengine.com/asset/images/avatars/ tag, the URL path is correct.

My LG tags include:

lg_saef_file_upload="y" lg_saef_file_upload_dir_id="37"

What I am doing wrong?

Thanks

       
Joobs's avatar
Joobs
362 posts
about 16 years ago
Joobs's avatar Joobs

what’s the text in the upload field for the weblog entry in the control panel? is it just “https://pagingstaging.expressionengine.com/asset/images/avatars/image.jpg”

Are you using any kind of text formatting plugin?

Have you tried turning off the feature for automatically turning urls into hyperlinks for that weblog?

       
tvruwink's avatar
tvruwink
22 posts
about 16 years ago
tvruwink's avatar tvruwink
what’s the text in the upload field for the weblog entry in the control panel? is it just “https://pagingstaging.expressionengine.com/asset/images/avatars/image.jpg” Are you using any kind of text formatting plugin? Have you tried turning off the feature for automatically turning urls into hyperlinks for that weblog?

Yes - If I go into the CP, and view the entry, the upload file shows https://pagingstaging.expressionengine.com/asset/images/avatars/image.jpg. If I bypass my SAEF completely, and use the CP, image uploads work fine.

No text formatting plugins that would cause any conflicts.

Not sure how the URL to hyperlink function would append the EE tag to my filename..

       
First 6 7 8 9

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.