jeudi 19 avril 2012 11:20
I have created an application in asp.net. Here I am allowing the User to store images. I want to store the Images in a BLOB and want to get the URL of the image and store it in the Ms Sql Database table.
I have written the Code to get the Container. The only thing that remains now is to add the Images....
What should I do ahead??? Please help!!!
Toutes les réponses
jeudi 19 avril 2012 11:41Modérateur
I have a couple simple code samples for upload block blobs that should get that part one.
That said, make sure the container's access policy has been set to public read (I really should do a quick code sample on setting this programatically) and you can quickly generate the full URI to view the image via a browser. You can get the base URI from the BlobClient then just append the container and blob names with the appropriate slashes between and you're all set.
- Marqué comme réponse Shivanand Arur jeudi 19 avril 2012 12:16
vendredi 20 avril 2012 11:56
Hello Brent, I am getting an error in the Code "One of the request inputs is out of range." Can you help me to solve this issue.... I read one article where it was written, if we give names to a Container in Uppercase or if there is any Uppercase alphabet in the name, then this exception is thrown.... (This is what I understood).... May be I'm wrong... But I changed the name with all lower case alphabets... But still I'm getting the same error....
mardi 1 mai 2012 12:41ModérateurSorry for the delay in getting back to your Shivanand, do you have any special characters in the name? What may help is only temporarially use a short and simple name. Anther option is to fire up fiddler or look at using Storage Analytics to further diagnosis exactly why the request is failling.
mercredi 2 mai 2012 07:55
Hello Brent, I have solved the issue. The Account name in the cscfg file was in Upper case. I simply changed it to lower case and now the app is working fine.
I have got one more issue, when I dynamically add an image in the BLOB. I am getting the URI, but when I copy the URI and check it in my browser, it gives me an error like this<Error><Code>ResourceNotFound</Code><Message>The specified resource does not exist. RequestId:bf2b08cc-54fb-4a24-a045-c008c0164ffe Time:2012-05-02T07:53:56.8774477Z</Message>
I don't know, why this is happening, so please help...
mercredi 2 mai 2012 10:07
Can you please shre the Format of the URI.
mercredi 2 mai 2012 10:17
This is the URI
mercredi 2 mai 2012 13:29ModérateurFirst thing I would do is make sure the container's access policy is set to allow public read.
- Marqué comme réponse Shivanand Arur jeudi 3 mai 2012 07:21
jeudi 3 mai 2012 07:25
Hey Brent, Thank's a lot, Earlier I had kept the Public Access Type to "OFF" and now I simply changed it to "Blob". I also deleted the old container since I thought the Container might have got corrupt and I re-created it. So now the entire module is working fine....
Once again, Thank you very much for the help.... :)