how to upload pictures to blob using azure and wp7 - wcf

i want to develop a wp7 application that can store geospatial data and pictures in an azure database.
does anyone have an idea on how to do this? Do i use blobs?
Cheers

There are a couple of codeplex and Microsoft projects that will help you
Firstly this community quick start - http://wp7azurequickstarts.codeplex.com/
Secondly the official toolkit - http://watoolkitwp7.codeplex.com/
There is a walkthrough which shows how MS recommend you upload photos to blob storage - http://watoolkitwp7.codeplex.com/wikipage?title=Running%20and%20Going%20Through%20the%20Windows%20Phone%207%20Cloud%20Application
The basic structure you use is:
a service which your app can call in Azure compute
that service can then store things in Blob, Table or SQL storage - most likely it will
store images in Blob
store index information in SQL (or maybe in table)
Note that while the app itself could upload direct to Azure Blob storage, this would most likely require you to distribute your secret private keys along with the app - which wouldn't be a good thing to do. If you did want to optimise the communications in you application, then you could implement a direct upload to blob using a shared access key retrieved from your Azure service (but I think this is only a small optimisation)

Related

Can I upload images from SQL Server to cloud services and which server is best?

I want to create a database for a company and I need to store some images for them. I want to give users the ability to select the image in form I create and then SQL server should upload it to a cloud service directly but I don't know how to do it and which cloud service is best for this job
thanks and regards, Yeki
You will have to elaborate on what you're looking for as there are multiple options avaialble.
1) If you're using Microsoft and are set on Cloud Services, look at the Azure Platform. You're able to store files and manage a database from the cloud and it is very cost effective. They will host your application as well if you need.
2) Are you not able to store the files in the same location the app is being hosted?
3) If the images are relatively small (i.e. less than 200kb), you can save them directly in the database.
You can store larger images, it's just not as efficient, so a file store would be better.

Usql with Azure Data Lake Store .net SDK

Can you please suggest can i use Usql with Azure Data Lake Store .net SDK.
Actually i need to upload some files to data lake store so i need to use Azure Data Lake Store SDK and i also need to add some record in Azure sql server database.
So i created a class library where i created a function to upload files to Data lake store as mentioned on below link:
https://learn.microsoft.com/en-us/azure/data-lake-store/data-lake-store-get-started-net-sdk
Then i am calling this function by usql. But its not working fine and throwing error.
Can you please suggest is it actually possible or not or i need to use any other approach for the same.
Thanks
The SDK is meant to be used from outside U-SQL, e.g., your client machine, or a VM outside of ADL, where the data lives that you want to upload.
If your files live inside ADLS already, see the answer to this question.
For more information why you cannot connect to web end points, see this reply.

can azure storage be used to make a social APP between azure users

can azure storage be used to make a social APP between azure users
My friend and me want to build an social APP based on azure storage.
Can I use azure storage realise this?
You can use Azure Storage in couple of ways to implement your idea. One of them being, to store the content shared between users from the social app. You can use Blob storage to store any type of text or binary data, such as a document or media files. Or you can use Table storage to store data as key-value pairs.
The other way is using the Queue storage for implementing a reliable messaging for workflow processing and for communication between components of your app in a cloud service.
Here are some resources you will find useful to design your app:
Azure Storage Samples: https://azure.microsoft.com/en-us/documentation/articles/storage-samples/
Get Started with Azure Storage in 5mins: https://azure.microsoft.com/en-us/documentation/articles/storage-getting-started-guide/

Uploading a file to a VarBinaryMax field into Windows Azure?

I'm extremely confused, so I've created an SQL Database in Windows Azure, created a "video table" with a "video_file" column as "varbinary(max)" because I want to upload a video file into that field, however Azure offers no "Upload" option like say, PHPMyAdmin does where you can hit "browse" and upload a video directly into the field. Can anyone guide me as to how to actually upload a file into a Windows Azure SQL Database so it can be read as a varbinary type? Can it be done within the Azure management portal? Or does it require some sort of external program/service?
To answer your question, the functionality to upload files directly into SQL Azure Database does not exist. This is something you have to do on your own.
Can anyone guide me as to how to actually upload a file into a Windows
Azure SQL Database so it can be read as a varbinary type?
Do a search for uploading files in SQL Server and you will find plenty of examples on how to do that. Take a look at this link for example: http://www.codeproject.com/Articles/225446/Uploading-and-downloading-files-to-from-a-SQL-Serv
Can it be done within the Azure management portal? Or does it require some sort of external program/service?
No. This functionality does not exist in Azure Management Portal. As mentioned above, you would need to write some code to do so.
A little bit off-topic comment:
May I suggest that instead of saving the image files in the database you save them in Blob Storage and store the URL of the blob in your table. There're some advantages I could see in this:
Compared to SQL Database, Azure Blob Storage is much cheaper. If you store video files (or in other words large files) in the database, you will end up with large database and thus end up paying more money.
You will be choking the database when reading this large data from the database which will impact the performance of your application.

Photos upload to Azure via WCF Services

I have a simple project to upload pics and Images to Azure, I have these strategies
WINDOWS PHONE -> WCF SERVICE -> AZURE SQL
WINDOWS PHONE -> WCF SERVICE -> AZURE STORAGE
WINDOWS PHONE -> AZURE STORAGE
However, I have these questions...
Can I go ahead with WCF Services and if yes, how to deal with large size images?
Maybe better upload from Windows Phone to Azure storage directly?
I would suggest that SQL database can be counted off to a large degree. storage is a much more cost effective way to store images which are essentially blobs, however - depending on your needs you might want to store metadata on the blobs in sql to assist in querying
If that is the case using a service layer can assist encapsulating the two paths - storing the blob and storing the metadata
Having said that, passing large blobs through a service is very inefficient and so, for the images themselves, phone->storage is perhaps the most compelling approach and will be the most efficient way to do so both from a coding perspective, solution components and responsiveness; the main downside with that is that it requires the phone app to have the credentials to the storage account, which is a big security risk.
Given all of this you might want to consider a combined flow -> phone->service to store metadata and receive a shared access signature token to the blob and then phone->storage, using the SAS token received, for the photo itself
you will need to handle failures in this flow to update the metadata accordingly...
slightly more complex, but with a good balance between security and performance?