Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Custom attribute with file upload
Last Post 10/21/2010 11:42 AM by Peter Donker. 7 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Stéphane Bebrone
New Member
New Member
Posts:31


--
10/01/2010 4:20 PM

Hi,

I'd like to create a custom attribute which will allow users to add an illustration (image file) to their document.

As far as I've seen it just a matter of setting the correct "control to load", but I dunno which one?

I tried with a "AspnetUpload.ascx", it appears correctly but the file is not been uploaded.

 

What can I do?

 

Best regard,

Stéphane.

 

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
10/06/2010 9:25 PM
Hi Stephane,

You'll need to create your own control for this and call that. The control needs to inherit the Framework.EntrySettingsBase and you will need to handle all the surrounding logic (like what happens to the uploaded file etc).

Peter
Stéphane Bebrone
New Member
New Member
Posts:31


--
10/07/2010 10:08 AM
Hi Peter,

Thank for the info. Is there any documentation available on this topic?
A sample would be perfect.

Best regard,
Stéphane.

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
10/11/2010 1:15 PM
No, sorry. I hope to release code samples at one point through the extensions section.

Peter
Stéphane Bebrone
New Member
New Member
Posts:31


--
10/19/2010 5:10 PM

 Btw this article written by you seems to be a good start:

http://www.bring2mind.net...stom-Attributes.aspx

++ :)

Stéphane Bebrone
New Member
New Member
Posts:31


--
10/19/2010 5:35 PM
I just have one question, how can I do to retrieve the attribute id? A configuration variable?
Stéphane Bebrone
New Member
New Member
Posts:31


--
10/20/2010 10:28 AM
Hi Peter,

Here's what I've come with:
http://pastebin.com/nckNqmbK

Notice that due to a bug (?), the AttributeId property of the EntryAttributeInfo object isn't filled. That's why I have to use a out parameter to return the key.

Best regard,
Stéphane.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
10/21/2010 11:42 AM
Hi Stephane,

If you use an attribute in your own logic what you do is to give it a key (instead of letting DMX generating an automatic one). That way you can retrieve it to get at the attribute id which you cache somewhere. Hope this helps.

Peter
You are not authorized to post a reply.