I need a little bit of help with RadUpload (Is this scenario possible?)

Thread is closed for posting
3 posts, 0 answers
  1. Boris
    Boris avatar
    275 posts
    Member since:
    Oct 2012

    Posted 06 Nov 2012 Link to this post

    I've basically put together a prototype based on your demos and forum entries as a way to re-familiarize myself with Telerik.

    I've been looking at your page: http://www.telerik.com/help/aspnet-ajax/upload-manipulating-files.html

    I've a RadUpload control on a RadGrid form template.  I have a button that I copied from one of your demos that fires the RadGrid_InsertCommand.   I know how to do a file.SaveAs(path name) and put it into the temp folder of the app.  The problem is that by the time I do a Save As, the original file is already in the temp folder under it's original name. 

    Is there anyway to intercept and rename it before it gets in there?  (The idea is to garantee every file in the temp folder has a unique name, no matter how briefly they're in there.)
  2. Plamen
    Plamen avatar
    2723 posts

    Posted 09 Nov 2012 Link to this post


    One possible workaround I could think of is to use the InputStream property to access the content of the uploaded files without saving them to a temporary location as it is explained in the bottom part of the same help article.

    You can also think of using RadAsyncUpload where the inbuilt functionality is similar to what you are trying to implement.

    hope this will be helpful.

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
  4. Boris
    Boris avatar
    275 posts
    Member since:
    Oct 2012

    Posted 09 Nov 2012 Link to this post

    I'll have to try that stream concept but I have to say that, for now, I don't understand what I'm seeing.  As I said, I patterned my code after your demos.  I should mention that all of my RadGrid template forms use the following controls:

    <telerik:RadButton ID="btnSave" runat="server" Text="Save" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>    </telerik:RadButton>                                                  
     <telerik:RadButton ID="btnCancel" runat="server" Text="Cancel" CausesValidation="False" CommandName="Cancel">

    Given that, I'd have to say I'm uncertain about what to do next.  The example seems to imply that I have to get rid of the above and implement a separate button click handler.  Am I to assume that this new handler would get to the file before it uploaded?  (As I said, I will have to give it a try.
Back to Top