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
I think I will make an option in the final release to include the {filedir} prefix. It could get confusing tho if you change your mind half way through and some of your older images break.
Then again the two plugin solutions seem like an easy way to keep consistency.
Hi Levy,
I’m running EE v 1.6.3 with MSM 1.0 on PHP 4.4.8. I’ve been trying to use the extension and it doesn’t upload the file but it does insert the data into the weblog/database.
The code:
{exp:weblog:entry_form weblog="gstupload" return="/TG/upload" lg_saef_file_upload="y" lg_saef_file_upload_dir_id="8"}
<input type="text" name="title" id="title" value="{title}">
<input type="hidden" name="entry_date" value="{entry_date}">
<input type="file" name="field_id_50" value="">
<input type="submit" name="submit" value="Submit">
{/exp:weblog:entry_form}
I’ve created a new upload destination (id=8) and if I have:
<input type="file" name="50" value="">
it doesn’t copy the value into the weblog.
So, I’m doing:
<input type="file" name="field_id_50" value="">
And that works to send the content to the DB.
Also, I have an .htaccess file to hide index.php in the URL but I don’t know if that can be related.
Any help will be welcome,
Many thanks,
Juan
Hi Leevi,
Looks like a great plug in, and after looking at a lot of options, am excited to get this working, but am running into a problem. I’m using the following code and it’s successfully uploading the file to the correct directory, but after hitting the submit button, I get a blank page (same URL as the submit form), and none of the info gets written to the database from either the select list field or the file field. Any ideas what might be going?
Also, if I just select one of the options in the select list and don’t upload a file, a weblog entry is successfully created.
Thanks for tackling this Leevi!
Paula
p.s. EE 1.6.1; PHP 5.2.0; MySQL 4.0.27
{exp:weblog:entry_form weblog="{my_weblog}" return="/postthanks" name="productform" lg_saef_file_upload = "y" lg_saef_file_upload_dir_id = "1"}
<label for="field_id_13">Product Type
<select name='field_id_13' class='select' >
<option value='Flooring' dir='ltr' >Flooring</option>
<option value='Lumber' dir='ltr' >Lumber</option>
<option value='Molding' dir='ltr' >Molding</option>
<option value='Natural-edge boards' dir='ltr' >Natural-edge boards</option>
<option value='Other' dir='ltr' >Other</option>
</select>
</label>
<label for="field_id_14">Upload Photo
<input type="file" name="field_id_14" value="" />
</label>
<input type="submit" name="submit" value="Submit" id="submitbutton"/>
<input type="hidden" name="title" value="prod<?php date_default_timezone_set('UTC'); echo date('ymd'); ?>" />
<input type="hidden" name="url_title" value="{url_title}" />
<input type="hidden" name="status" value="closed" />
<input type="hidden" name="entry_date" value="{entry_date}">
<input type="hidden" name="field_ft_13" value="none" />
<input type="hidden" name="field_ft_14" value="none" />
{/exp:weblog:entry_form}
This plugin worked great meaning it did what i was supposed to. However, I can not load my control panel with it installed. I had to disable all extensions in the .config file to get in. Once inside the CP I enabled all extensions with the “enable button”, after which I disabled the the LG SAEF File Upload using the disable link.
Note: Simply deleting the extension didn’t work because the Control Panel would still look for the missing ext. file. It took a while of trial and error to figure that out.
I love the extention because it was working until I realized the next day that I couldn’t get in the CP. I have purchased from LG and use other LG stuff. Thanks for all your contributions to the EE world. I’m fast becoming an EE Addict!
For anyone running into a blank screen when they try to upload a file, you might want to check out this thread. It worked for me, although it might not be an ideal solution for every site, given the security issues.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.