API Questions on Kentico API.
Version 5.x > API > save an image in a custom table programmatically View modes: 
User avatar
Member
Member
mj-y - 11/13/2013 1:07:02 PM
   
save an image in a custom table programmatically
I have a custom table with an image field . I have been created a form (web user control) for insert into that table. the reasons that I don't use an alternative form are:
1- the conditions for inserting are so complicated and I can't
2- "select image" control don't work in user login mode ( and if it works, it shows all the images in the kentico!), I want something like avatar selector (like fileupload in asp.net).
3- I want to use an editor in my form, and fckeditor in kentico don't show properly in user login mode! ( I desribed this problem in this thread: here)

and of couse I want to save my images like the way kentico saves, because I have used this fiels in other parts of my project. Is there any special webpart, control or function that can do it for me? if not, how can I determine the proccess of saving an image?

User avatar
Member
Member
mj-y - 11/16/2013 12:24:46 AM
   
RE:save an image in a custom table programmatically
Hi... I really need the answer of this question... Is my question clear or more clarification is needed?
options 1 and 3 seems to be solvable with alternative forms, so if there is a way to select an image in "user logged mode" with a simple image selector, plz let me know...

User avatar
Member
Member
kentico_sandroj - 12/1/2013 1:06:54 PM
   
RE:save an image in a custom table programmatically
Hello,

Your description is not very clear but it seems that you want to be able to select an image from an existing list, but not all images? can you please be more specific?

"is a way to select an image in "user logged mode" with a simple image selector"

Yes you can use the standard controls to accomplish this but based on your first post you are not looking for a simple image selector. You will likely have to develop a custom control.

As for the CKEditor issue, upgrading the package solves the WYSIWYG issue when logged in. The instructions are available in the link you provided.

Best Regards,
Sandro

User avatar
Member
Member
mj-y - 12/2/2013 10:46:39 AM
   
RE:save an image in a custom table programmatically
thanks a lot for your answer...
I solved my problem... I just did not want to show all pictures to user...
so I created a new control with the help of this link:
http://devnet.kentico.com/docs/devguide/index.html?developing_form_controls.htm
and the codes of this control:
~\CMSModules\Content\Controls\Attachments\FileUpload.ascx.cs

User avatar
Member
Member
adajones717-hotmail - 2/14/2014 1:28:32 AM
   
RE:save an image in a custom table programmatically
mj-y wrote: thanks a lot for your answer...
I solved my problem... I just did not want to display all pictures/images to user...
so I created a new control to save image with the help of this link:
http://devnet.kentico.com/docs/devguide/index.html?developing_form_controls.htm
and the codes of this control:
~\CMSModules\Content\Controls\Attachments\FileUpload.ascx.cs


Thank you for not leaving this topic unsolved. The link and codes really help a lot.