Answered by:
Uploading mp3 files in Lightswitch HTML client

Question
-
Hello,
I'm trying to upload async a mp3 file in lightswitch HTML with kind of progress bar.
I've seen some examples of how to upload files, but the files are like images that are fast to upload. Because this I'd like a progress bar to show the customer how long it will take.
Someone know how can I do it ?
Wednesday, June 18, 2014 7:40 PM
Answers
-
Any of these should work:
http://designscrazed.net/html5-jquery-file-upload-scripts/
I have no examples, sorry.
Unleash the Power - Get the LightSwitch HTML Client book
http://LightSwitchHelpWebsite.com
- Edited by ADefwebserver Tuesday, June 24, 2014 7:52 PM
- Proposed as answer by Simon Jones [MSDL] Wednesday, June 25, 2014 7:30 AM
- Marked as answer by Angie Xu Thursday, June 26, 2014 1:22 AM
Wednesday, June 18, 2014 8:02 PM
All replies
-
Any of these should work:
http://designscrazed.net/html5-jquery-file-upload-scripts/
I have no examples, sorry.
Unleash the Power - Get the LightSwitch HTML Client book
http://LightSwitchHelpWebsite.com
- Edited by ADefwebserver Tuesday, June 24, 2014 7:52 PM
- Proposed as answer by Simon Jones [MSDL] Wednesday, June 25, 2014 7:30 AM
- Marked as answer by Angie Xu Thursday, June 26, 2014 1:22 AM
Wednesday, June 18, 2014 8:02 PM -
Thank you ADefwebserver, I used an ashx files in a asynchronous methods, that return progress.
But I have one more question of your time.
I know you know many things about Lightswitch, I have to rename this mp3 files with ID identity of database, is there any event after save or after commit ?
Tuesday, June 24, 2014 2:40 PM -
After you call SaveChanges() you can then get the ID of the record that was just saved. See:
Integrating PayPal With Visual Studio LightSwitch
// Associate the Picture to the PayPalTransaction objPayPalTransaction.Picture = objPicture; // Save the record so we get a Id to use in the PayPal request serverContext.DataWorkspace.ApplicationData.SaveChanges(); // set PayPalPurchaseTransactionId PayPalPurchaseTransactionId = objPayPalTransaction.Id;
Tuesday, June 24, 2014 4:09 PM