Upload to database FileBrowserContentProvider?

Thread is closed for posting
7 posts, 0 answers
  1. JC
    JC avatar
    31 posts
    Member since:
    Aug 2012

    Posted 18 Nov 2008 Link to this post

    It would be very nice if Telerik modified the RadUpload to allow us to use the FileBrowserContentProvider to override the methods and save / load directly from database as we can now with the imagemanager and others in the RadEdit control.  

    Has anyone heard anything about this or a good way to upload directly to DB using the RadUpload (all the stuff that came up in my search is over a year old).
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 18 Nov 2008 Link to this post

    Hello AyaNova,

    This example demonstrates how to upload images in the database (apart from everything else). It is using the SessionDataSource control but that can be easily converted to SqlDataSource control.

    Regards,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. JC
    JC avatar
    31 posts
    Member since:
    Aug 2012

    Posted 18 Nov 2008 Link to this post

    Interesting, thanks Albert, all the other stuff I came across showed saving to disk first and then reading back to insert in the database, from what I can see of that example the files are not written to disk but cached somewhere? (I don't see any path's specified anywhere in that code)

    (I'm trying to avoid end users having to set rights for file upload directories etc)
  4. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 18 Nov 2008 Link to this post

    Hello AyaNova,

    This example stores the image file in the database. However the changes are not committed to the database for the sake of the example (due the fact it uses SessionDataSource). So yes, in this example the files are saved in the session. However if you replace the SessionDataSource with say SqlDataSource you would be able to commit the changes to your database.

    Regards,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. JC
    JC avatar
    31 posts
    Member since:
    Aug 2012

    Posted 18 Nov 2008 Link to this post

    Hi Albert, not quite what I wanted to know: Does that example involve at any point the file being saved to disk or is the file held in memory when it's uploaded. I want to know what would be required for security permissions at the file server.  

    I know how to handle the database part and it appears that the file is obtained from the control, what I want to know is does that control at any point need to write to the file system in order to support uploading?
  6. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 18 Nov 2008 Link to this post

    Hello AyaNova,

    ASP.NET file uploads are stored in a temporary location which does not require setting any permissions.

    I hope this helps,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. JC
    JC avatar
    31 posts
    Member since:
    Aug 2012

    Posted 18 Nov 2008 Link to this post

    Perfect, thank you Albert.
Back to Top