Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Frontend upload doesn't work

Quote Reply
Frontend upload doesn't work
Hi,

i hope there isn't a limit of thread per user, because i have another few threads to open :D
The email problem of the other topic is in "stand-by", so in the meanwhile i ask you for this problem:
from the user panel(either in add or modify) upload doesn't work.
This is what it happens when i add a new link as an user:
1-If i don't select an image to upload, it works correctly.
2-If i select an image to upload, it gives me this error message:
"Could not open 1/14-winebar_thumb.jpg because No such file or directory".(the file, in fact, is not upload in any directory)
But not only: the new link is added to the Links table(as "waiting for validation") WITHOUT category information, and the file is added to the Links_Files table.

Here is my include_form.html template, 'ImmagineUp' is the file field:

Code:
<div class="row required clear">
<label for="Title" class="name">Titolo sito: <span>*</span></label>
<div class="value">
<input type="text" id="Title" name="Title" value="<%if Title%><%escape_html Title%><%endif%>" class="text" />
</div>
</div>
<div class="row required clear">
<label for="URL" class="name">URL sito: <span>*</span></label>
<div class="value">
<input type="text" id="URL" name="URL" value="<%if URL%><%escape_html URL%><%else%>http://<%endif%>" class="text" />
</div>

<div class="row<%unless category_loop_selected%> required<%endunless%> clear">
<label for="CatLinks.CategoryID" class="name">Categoria:<%unless category_loop_selected%> <span>*</span><%endunless%></label>
<div class="value wrappedtext">
<%~if config.db_gen_category_list == 2%>
<script type="text/javascript" src="<%config.build_static_url%>/treecats.js"></script>
<%~set selected_cats = Links::Tools::category_list_selected%>
<%~loop selected_cats%>
<input type="hidden" name="CatLinks.CategoryID" value="<%escape_html ID%>" />
<%~endloop%>
<noscript>
<ul class="categories">
<%~loop selected_cats%>
<li><%Full_Name%></li>
<%~endloop%>
<%~if not selected_cats.length%>
<li><%Links::language('ADD_SELCAT')%></li>
<%~endif%>
</ul>
</noscript>
<div id="treecats"></div>
<script type="text/javascript">
var tc = new treecats({ <%-- selectionMode : 'multiple', --%> cgiURL : '<%config.db_cgi_url%>', imageURL : '<%config.build_static_url%>/<%t%>/images' });
tc.load();
</script>
<%~elsif category_loop_selected%>
<%~if category_loop.length > 1%>
<ul class="categories"><%loop category_loop%><li><%Full_Name%><input type="hidden" name="CatLinks.CategoryID" value="<%escape_html ID%>" /></li><%endloop%></ul>
<%~else%>
<%loop category_loop%><%Full_Name%><input type="hidden" name="CatLinks.CategoryID" value="<%escape_html ID%>" /><%endloop%>
<%~endif%>
<%~else%>
<select id="CatLinks.CategoryID" name="CatLinks.CategoryID">
<%~loop category_loop%>
<option value="<%escape_html ID%>"<%if selected%> selected="selected"<%endif%>><%'&nbsp;&nbsp;' x $CatDepth%><%Name%></option>
<%~endloop%>
</select>
<%~endif%>
</div>
</div>
<div class="row clear">
<label for="Description" class="name">Descrizione:</label>
<div class="value">
<textarea id="Description" name="Description" rows="3" cols="42"><%if Description%><%escape_html Description%><%endif%></textarea>
</div>
</div>
<div class="row clear">
<label for="Contact_Name" class="name">Nome:</label>
<div class="value">
<input type="text" id="Contact_Name" name="Contact_Name" value="<%if Contact_Name%><%escape_html Contact_Name%><%endif%>" class="text" />
</div>
</div>
<div class="row clear">
<label for="Contact_Email" class="name">E-mail:</label>
<div class="value">
<input type="text" id="Contact_Email" name="Contact_Email" value="<%if Contact_Email%><%escape_html Contact_Email%><%endif%>" class="text" />
</div>
</div>
<div class="row clear">
<label for="ImmagineUp" class="name">Logo:</label>
<div class="value">
<input type="file" id="ImmagineUp" name="ImmagineUp" />
</div>
</div>

Last edited by:

sbato: Aug 4, 2008, 1:57 AM
Quote Reply
Re: [sbato] Frontend upload doesn't work In reply to
Mmm.. little hard to really work out from that. If you want, send over FTP and Glinks login details, and I'll take a quick look for you.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Frontend upload doesn't work In reply to
For anyone interested - it was a path problem in the file_save_path in the image field setup. You MUST use a full path, not something like ../test

...otherwise, Glinks doesn't know where to save it =) (not sure why the admin worked ok - but I've fixed it up, and its all working fine now from admin and user add.cgi)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Frontend upload doesn't work In reply to
thanks again!!