Portal Engine
Version 3.x > Portal Engine > Programmaticaly upload a file View modes: 
User avatar
Member
Member
akriotis-compupress - 12/3/2008 8:33:08 AM
   
Programmaticaly upload a file
Is it possible to upload programmatically a file ?

User avatar
Member
Member
akriotis-compupress - 12/3/2008 8:37:12 AM
   
RE:Programmaticaly upload a file
i'm basically interested in uploading a set of files through a form control used as a new field type of a new document type. i want to do this through a custom class of my own and bypass the upload file control provided by kentico which allows only a single file. Is it possible with the current version of Kentico ?

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 12/3/2008 9:03:56 AM
   
RE:Programmaticaly upload a file
Hello,

Could you please specify what upload dialog do you mean?

Best Regards,
Boris Pocatko

User avatar
Member
Member
akriotis-compupress - 12/3/2008 9:13:38 AM
   
RE:Programmaticaly upload a file
Hi,

not an upload dialog.

I want to build a new field type for my custom document types (lets say movie type) (Site Manager->Development->Document Types->Fields ) like File Selection which should have the ability of multiple file selection and uploading. More specificaly i want to build a field which could accept at once the links of more than one files (e.g. uploading a gallery of pictures lets say movie pics and save them as comma or semicolon separated values in the corresponding field in the database). Kentico has the ability to create single file selection which in the specific case is not enough. I dont know if i expressed it well sorry for my english.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 12/3/2008 10:29:55 AM
   
RE:Programmaticaly upload a file
Hello again,

I am sorry for the misunderstanding. You could create a custom form control which would upload the files separately. Please see the following link for more information about custom form controls http://www.kentico.com/docs/devguide/form_controls_overview.htm.

I hope this helps.

Best Regards,
Boris Pocatko

User avatar
Member
Member
akriotis-compupress - 12/4/2008 4:00:23 AM
   
RE:Programmaticaly upload a file
Not exactly. I want the separate files to be stored in the SAME database field. Any guidance through the API on how to programmatically upload a batch of files and bind them with the specific document (which is currently being edited or created) would be appreciated.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 12/5/2008 4:43:34 AM
   
RE:Programmaticaly upload a file
Hello,

Could you please go through the following chapters? I think They will be helpful.

http://devnet.kentico.com/docs/devguide/content_management_internals.htm
http://devnet.kentico.com/docs/devguide/managing_attachments.htm

Our API guide reference.
http://devnet.kentico.com/downloads/kenticocms_api.zip

I would recommend you to check, how we manage the file uploading at the point, you want to change. If you want to edit the CMS Desk/CMS Site manager, you can find out what files are displaying the given content with the Firefox browser. "Right click on the given frame -> This Frame -> View frame info" - there is the path of the file, which contains the displayed page.

I hope this helps.

Please let me know if you have any further questions.

Best Regards,
Boris Pocatko

User avatar
Member
Member
enelson-drhorton - 8/9/2012 10:29:12 AM
   
RE:Programmaticaly upload a file
kentico_borisp wrote: Hello,
http://devnet.kentico.com/docs/devguide/content_management_internals.htm
http://devnet.kentico.com/docs/devguide/managing_attachments.htm

Best Regards,
Boris Pocatko


I was researching a similiar problem. However, these links do not work.

Can I get updated links?

Thanks

User avatar
Member
Member
zhaojicheng-artmtech - 4/4/2009 1:48:28 AM
   
RE:Programmaticaly upload a file
unfortunately that is not support.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 8/11/2012 2:23:18 PM
   
RE:Programmaticaly upload a file
Hi,

to upload multiple files in one field you could use a default document attachment control. How to add it to document type definition and display uploaded files you can find here:
attachments

It is possible that link will not display images correctly. In this case simply open the documentation in a different tab and find the document it the tree menu. Then images will be displayed correctly.

Best regards,
Ivana Tomanickova