4

I am building an app that is entirely Silverlight. It is hosted on Windows Azure. How can I do file upload?

There are a number of SL file uploaders, such as this one, which don't work for me because they are stand-alone SL controls - they can't be embedded in my app.

I see a few SL file upload examples that seem straightforward enough, but do I have to do something different for Azure than a normal ASP app?

Thanks.

2 Answers 2

1

Aside from WCF tweaks you might need to make (documented here), you need to think about where you'll be storing your file on the server. You can't just write to a local drive. Ok, you can but local storage isn't guaranteed to stick around. Instead, you'll want to consider storing your upload in an Azure blob, which is considered Durable Storage (it's backed up to multiple locations).

If you upload to an Azure blob directly from your Silverlight client, you'll need to connect with the Azure Storage API. You need to be careful about embedding your key within your Silverlight app, and the recommended guidance is to used Shared Access Signatures - see Steve Marx's post for more info about this.

You can also continue to use a WCF service, and having that service method then store your upload to a blob. This gives you the ability to keep your Silverlight app's upload logic intact, and also rely on your service tier to track access to your uploaded file.

Sign up to request clarification or add additional context in comments.

Comments

0

You can use REST to make uploads directly to Azure. See my sample doing exactly that with parallelism, reties and cancellations enabled at: Silverlight based parallel upload control

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.