Getting BLOB content in C#

Folks,
I've an image file in BLOB container and I need to download the file on client devices. I've both container, file name and image URL as well. Which one gives better performance to get the data from Azure storage by following mechanism.
1. Access BLOB container directly by container and file name with help of WindowsAzure.Storage Library
2. Download the content from URL by using WebClient().DownloadData method
Suggestion please...
Thanks
hibrise

Hi hibrise,
Based on my understanding, there is no difference about performance between two methods.
In Azure Storage Library, You can use first retrieve a blob reference and then call the
DownloadToStream method. While in the WebClient, Call the DownloadData method,it get he array bytes from the URI specificed
Best Regards,
Kevin Shen.

Similar Messages

  • Display blob content as pdf file

    Dear Expert,
    Currently i'm using oracle apex 3.0.1.
    I'm having a problem on displaying blob content (from database table) as pdf file on oracle application express but i'm able to save to download the pdf.
    Below is the procedure that i used to display blob content,
    PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    begin
    selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
    into lob_loc,l_length
    from ord_img
    where oi_tno= pv_image
    and oi_ti='PDF'
    and oi_idx=pv_index;
    exception
    when others then
    null;
    end;
    OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
    HTP.p ('Content-length: ' || l_length);
    OWA_UTIL.http_header_close;
    WPG_DOCLOAD.download_file (lob_loc);
    END lf_html_pdf;
    I get the error message as below when i execute the procedure above;
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    *06502. 00000 - "PL/SQL: numeric or value error%s"*
    I'm appreciated if expert can have me on the problem above?
    Thanks
    From junior

    *Always post code wrapped in <a href=http://wikis.sun.com/display/Forums/Forums+FAQ#ForumsFAQ-Arethereanyusefulformattingoptionsnotshownonthesidebar?"><tt>\...\</tt> tags</a>:*
      PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
         l_mime        VARCHAR2 (255);
         l_length      NUMBER;
         l_file_name   VARCHAR2 (2000);
         lob_loc       BLOB;
      BEGIN
          begin
            selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
            into lob_loc,l_length
            from ord_img
            where  oi_tno= pv_image
              and oi_ti='PDF'
              and oi_idx=pv_index;
          exception
                when others then
                null;
            end;
         OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
         HTP.p ('Content-length: ' || l_length);
         OWA_UTIL.http_header_close;
         WPG_DOCLOAD.download_file (lob_loc);
      END lf_html_pdf; Start by getting rid of:
          exception
                when others then
                null;and never using it anywhere ever again.
    If you're not actually going to use the <tt>l_mime</tt> and <tt>l_file_name</tt> variables then remove these as well. (Although I really think you should set a filename.)
    >
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    06502. 00000 - "PL/SQL: numeric or value error%s"
    >
    The error stack indicates that the exception is being raised in <tt>HCLABPRO.PKG_PDF</tt>: what is <tt>HCLABPRO.PKG_PDF</tt>? Does this actually have anything to do with the procedure above?
    I get the error message as below when i execute the procedure above;How do you execute it?
    What happens when it's executed without the <tt>when others...</tt> built-in bug?

  • Possible to take a blob content out of table

    Hi,
    i have a table in which the image is getting storing in the table in blob content.
    Whether it is possible to copy that image which is stored in the table to outside, so that i can edit the photo in paint.
    It is possible to take that blobcontent of the image out of the table.
    If so, how to achieve it.
    Regards,
    Saro.

    Hi Saubhik,
    Thanks for the reply, but i get the following error while compiling the code after altered to my requirement.
    DECLARE
    b             BLOB;
    file_handle   UTL_FILE.FILE_TYPE;
    file_dir      varchar2(100) := '\ebiz1\proddb\apeximages';
    l_blob_len    INTEGER;
    BEGIN
    SELECT   blob_content
    INTO   b
    FROM   a_images2
    WHERE   employee_number = '048';
    file_handle := UTL_FILE.FOPEN (file_dir, 'prasad.png', 'wb')
    l_blob_len := DBMS_LOB.getlength (b);
    UTL_FILE.FCLOSE (file_handle);
    end;This is the error message
    ORA-29280: invalid directory path
    ORA-06512: at "SYS.UTL_FILE", line 41
    ORA-06512: at "SYS.UTL_FILE", line 478
    ORA-06512: at line 15
    Since i have referred the oracle path only, then also it is throwing the error.
    Thanks
    Saro

  • Discoverer portlet error: blob content is empty.

    I created 6 disco reports and some are giving error, Failed to retrieve an entry from the cache in the Discoverer Portlet Repository. The BLOB content is empty.
    This error only happens with certain users. The users can log directly into discoveer viewer and see the reports. Just not in portal. It also gives me this error randomly and I have to delete the portlet and recreate it. Has anyone else experienced this problem.
    BH

    I copied and pasted the above code to my jsp. It works fine for me . I get the content correctly. Tried on a ps 7.1
    hope the additional character "/>" is not intended
    <td>city</td><td><input name="city"value="city"/>/></td>

  • See BLOB contents on Oracle FORMS

    Is there anyway that I can see the BLOB object contents in Oracle Forms? For example, if I have a word document in BLOB, I should be able to open it in Oracle forms. I've already posted this today, but just for clarification, I'm reposting this with exact requirements. My client wishes to see data from a table and in that a BLOB object is one of the columns. For each row, there is a word document, which should also be displayed (or at least a link) on Form. If clicked on the link, the BLOB content, i.e., the word document should get opened. Please let me know if there is any way. Francois was trying to help me, I think this explanation makes it clear for him and also others. I don't have webutil library and my Forms version is 6.0.8.18.3. Please help me soon. I'm in an urgent realease this weekend and need this deliberately. It is not possible to upgrade to newer version for me.
    Thanks
    Sarma.

    In fact, I just had to do this today. It works as expected using an image item on the BLOB column. I am at 10.1.2.0.2, if that makes any difference. Are you positive you have data in the BLOB column? I noticed that after loading a table with image items, I used SQL Developer to look at the table to ensure there was data in the rows. After that, the images no longer appeared in the form. I had to reload the table, then all was well again.

  • How to get blob image width with ordimage?

    Hello,
    I have trouble getting image width with ordimage. I have quite the same program for processing images as here: http://spendolini.blogspot.com/2005/10/manipulating-images-with-database.html
    so I have declared image files as BLOB files. How can I get the width for the them?
    There is a sample from ordimage reference:
    DECLARE
    image ORDSYS.ORDImage;
    width INTEGER;
    BEGIN
    SELECT p.product_photo INTO image FROM pm.online_media p
    WHERE p.product_id = 3515;
    -- Get the image width:
    width := image.getWidth();
    DBMS_OUTPUT.PUT_LINE('Width is ' || width);
    COMMIT;
    END;
    the ORDSYS.ORDIMAGE is used instead of BLOB here. when i do the same then i can't select BLOB content into the ORDSYS.ORDIMAGE variable. And otherwise I can't use the getWidth with the BLOB variable.
    Can anybody help please?

    Hi,
    the column blob_content is not suitable for storing into v_image2 because variable v_image2 is of type ORDSYS.ORDIMAGE and the column is BLOB.
    I used the following method instead:
    declare
    image blob;
    attributes clob;
    img_mimeType varchar2(32);
    img_width integer;
    img_height integer;
    img_contentLength integer;
    fileFormat varchar2(32);
    contentFormat varchar2(32);
    compressionFormat varchar2(32);
    begin
    DBMS_LOB.CREATETEMPORARY(attributes, TRUE, DBMS_LOB.CALL);
    select img
    into image
    from image_repository
    where id = 0;
    ORDSYS.ORDImage.getProperties(image,
    attributes,
    img_mimeType,
    img_width,
    img_height,
    fileFormat,
    compressionFormat,
    contentFormat,
    img_contentLength);
    dbms_output.put_line(img_mimeType);
    dbms_output.put_line(img_width);
    dbms_output.put_line(img_height);
    dbms_output.put_line(fileFormat);
    dbms_output.put_line(compressionFormat);
    dbms_output.put_line(contentFormat);
    dbms_output.put_line(img_contentLength);
    DBMS_LOB.FREETEMPORARY(attributes);
    end;
    try adapting this code and think about the possibility of "caching" image properties, because it takes some time to retrieve them every time.
    Bye,
    Flavio
    http://oraclequirks.blogspot.com/search/label/Apex

  • How can i get the content of JTextArea with out loosing Indentation.

    I am developing one mail sending application. I am getting mailid , from address, mail body from one Swing. In one JTextArea i am typing i have typed some matter. When i call the content of JTextArea using
    jtx.getText() method, i am getting all the content as one paragraph. That means there is no indentation which was there in TextArea.
    Please provide me some solution how can i get the content of JTextArea wiht out loosing indentation.

    And it was you who asked the question!

  • Get all content from iTouch to a new computer.

    My problem is very simple to explain, but I find no solution.
    My old computer is damaged and I cant use it anymore. So I bought a new one and I want to get all my stuff from the iTouch to iTunes on me new computer. After installing iTunes I actived in iTunes my iTouch for iTunes. In iTunes I get the massage that now two computers are actived (5 are possible).
    So I connect my iTouch with the wire to my computer and I get the massage that my iTouch is logical connected with an other iTunes libary. I get the only possibility to delete my iTouch and syncronize it with the content of the new iTunes libary.
    *My question is how can I get my content from the iPod touch to iTunes on my new computer?*

    Hi,
    Welcome to Apple discussions.
    So, in a perfect world, you would restore your library of valuable music from *your backed up files* to the library on your new PC, you know, the ones burnt to DVD/CD or on an external HD.
    This is the way iTunes works, it makes it perfectly clear and actively encourages users to *back up your music*.
    The iPod touch is not a back up device (nor is it advertised as one) it is a music player with a volatile memory that could actually disappear at anytime so it should not be trusted as a store for valuable files.
    To salvage your music you will have to use some 3rd party application on your PC/Mac (you fail to say) such as [Touch Copy|http://www.wideanglesoftware.com/touchcopy/index.html], Google for other options. This is not guaranteed to work but hopefully you will get your music back.
    Then back up.
    Good luck,
    Dud.
    *iPod touch* by the way, this an [ITOUCH|http://en.pasen.it/product_detail.php?id=36]

  • I could not found all music and videos in my laptop in itunes? how can i get all content to my itunes?

    hi i am using iphone 3gs 32gb. i installed itunes in my laptop but i couldnot found all files like music and videos present in my laptop. can anybody tel how to get all content? thanks you

    The songs that you downloaded on the iPad can be transferred to the computer when you sync with iTunes. For the music from your cousins computer - if they were purchased with his Apple ID - you can't sync them to your iTunes account.

  • My computer crashed and my itunes library only has my purchases which is 645 songs instead none of my play lists.  my 60g ipod has 1145 songs and all my playlists.  how do i get this content back to my itunes program

    my computer crashed and i had to reinstall intunes.  i have 1144 songs plus some playlists on my old 60g ipod.  my itunes library on my computer only has the songs that i purchased from itunes and none of playlists.  how do i get this content form my ipod back onto my itunes program on my computer.

    check out this post by Zevoneer.

  • To get the content of a pdf file in a particular position in text format

    I am troubling with geting the content of a pdf file in a particular position.I got the code to get the content of a pdf document as whole in text format.But i only need the content at a particular area.
    i am using PDFTextStripper class in pdfBox jar to get the content as whole.
    pls send some sample code
    pls help me
    Edited by: thomas00 on Sep 21, 2007 2:55 AM
    Edited by: thomas00 on Sep 21, 2007 3:08 AM

    pls any one reply

  • I am thinking of buying a MacBook Air and am wondering how to get the content of my iPad into iTunes.

    I have iTunes on an old pc and am thinking of buying a MacBook Air. I am wondering how to get the content of my iPad on to the Mac as I know that sync only happens in one direction, from pc to device. I assume therefore that when I attach my pad to the new Mac it will sync to an empty iTunes and I will have lost all the content of my pad. I know I can restore purchases, but what about contacts, calendar, photos and music not purchased from apple. I have a fairly recent backup on a pen drive but it is a usb2 device and is formatted for a pc. Any advice would be appreciated.

    Do I copy my media library or from a backup.  I have a backup on my pc and on an external drive. This drive is usb2 and formatted for windows so I can't connect it to a MacBook Air to make the transfer.  Equally I don't think there is a way to connect the 2 computers via a cable ie usb2 one end and usb3 the other.  Will the computers talk to each other via wifi if I enable home share although I think this is only for music which still leaves contacts, mail etc.
    I am sorry to be such an ignoramus but any further help would be appreciated.

  • My iTunes library is on an old PC that no longer works. I purchased a new iPod Touch.  How can I get the contents of my library to the new iPod?

    My iTunes library is on an old PC that no longer works. I purchased a new iPod Touch.  How can I get the contents of my library to the new iPod?

    My iTunes library is on an old PC that no longer works. I purchased a new iPod Touch.  How can I get the contents of my library to the new iPod?

  • I got some books from the itunes store and put them into my library.  I created a playlist so that I could burn them to cds.  The title is there but no contents.  It won't even play the playlist.  How do I get the contents of the book?

    I got some books from the itunes store and put them into my library.  I created a playlist so that I could burn them to cds.  It won't even play the book, there are no contents.  How do I get the contents of the book?

    I'm guessing this is a problem unique to me as there have been no replies at all...  Thanks a bunch folks

  • How to get the content in embed swf file in Swf Loader on run time

    How to get the content in embed swf file in Swf Loader on run time
    [Bindable]
    [Embed(source="assets/index.swf")]
       private var SWFSRC:Class;
    <mx:SWFLoader id="_swfloader" source="{SWFSRC}" />

    Hi Flex harUI,
    Throw the error.
    Access of undefined property content

Maybe you are looking for

  • Interactive PDF Form

    I'd like to know whichi program best suited for interactive PDF forms which can get its information from a SQL database. For example on the form the line that state "Customer's Name" is written and that customer name can be drawn from a database whic

  • How to serialize the txt file?

    HI, part of my program is as followings: FileInputStream f = new FileInputStream ("c:/test1.txt"); ObjectInputStream s =new ObjectInputStream (f); but,there is an exception when debugging when it runs to second line above.I think this is the problem

  • Merge multiple mail libraries

    well - for whatever reason I have a total mess. Have got an iMAC (i.e. Master), a PowerBook and a MacBook. All e-mails from several years should be in mail on iMAC; now - if clicking on a e-mail heading let's say from last year a blank screen will op

  • HP LaserJet 4250 stalls on 2nd page of Duplex print

    I work in a University IT Department where we maintain over 80 networked HP Laser printers, mostly HP LJ4250's with duplexers installed.   When students send a "PDF" duplex print job, the printer quickly prints the first page and sucks it back into t

  • Elements 10 won't create a new canvas or open a previously created document

    Last month I purchased a new computer running on windows 7 and Elements 10.  It worked fine when I installed it on the computer and then all of a sudden wouldn't allow me to create a new canvas or open a previously created document.  Can someone help