{"id":1707,"date":"2017-08-24T17:47:18","date_gmt":"2017-08-24T17:47:18","guid":{"rendered":"http:\/\/zappysys.com\/blog\/?p=1707"},"modified":"2025-10-30T23:42:36","modified_gmt":"2025-10-30T23:42:36","slug":"how-to-check-file-size-before-download-from-url","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/","title":{"rendered":"Tip \u2013 How to check file size before download from URL"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1897 alignleft\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png\" alt=\"\" width=\"90\" height=\"90\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png 180w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip-150x150.png 150w\" sizes=\"(max-width: 90px) 100vw, 90px\" \/><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">In this article, you will see how to use the\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-rest-api-web-service-task\/\" target=\"_blank\" rel=\"noopener\">SSIS REST API Task<\/a> to get the file size without actually downloading it.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span id=\"Prerequisites\">Prerequisites<\/span><\/h2>\n<p>Before we look into the Step-By-Step section to get the file size from the URL, let\u2019s make sure you meet the following requirements.<\/p>\n<ol>\n<li>SSIS designer installed. Sometimes it is referred to as BIDS or SSDT (<a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/ssdt\/download-sql-server-data-tools-ssdt\" target=\"_blank\" rel=\"noopener\">download it from the Microsoft site<\/a>).<\/li>\n<li>Basic knowledge of SSIS package\u00a0development using\u00a0<em>Microsoft SQL Server Integration Services<\/em>.<\/li>\n<li><a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\"><em>ZappySys SSIS PowerPack<\/em>\u00a0installed<\/a>. Click on the link to download.<\/li>\n<\/ol>\n<h2>Configure SSIS REST API Task to Get file size from URL<\/h2>\n<p>Now, let&#8217;s look at how to get the file size from a URL<\/p>\n<ol>\n<li>Open the SSIS Package and go to the Control Flow designer<\/li>\n<li>Create a new SSIS variable called <strong>ContentSizeInBytes<\/strong><\/li>\n<li>Drag and drop the <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-rest-api-web-service-task\/\" target=\"_blank\" rel=\"noopener\">ZS REST API Task<\/a> from the SSIS Toolbox<\/li>\n<li>Double-click the API Task to configure. Enter following\n<ol>\n<li>Enter the File URL you&#8217;d like to download<\/li>\n<li>Change the default method from GET to HEAD\n<div id=\"attachment_11600\" style=\"width: 848px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/REST-API-task-configuration.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-11600\" class=\"size-full wp-image-11600\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/REST-API-task-configuration.png\" alt=\"\" width=\"838\" height=\"735\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/REST-API-task-configuration.png 838w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/REST-API-task-configuration-300x263.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/REST-API-task-configuration-768x674.png 768w\" sizes=\"(max-width: 838px) 100vw, 838px\" \/><\/a><p id=\"caption-attachment-11600\" class=\"wp-caption-text\">REST API task configuration<\/p><\/div><\/li>\n<\/ol>\n<\/li>\n<li>Click Test. Review <strong>Content-Length<\/strong> header in Response. That&#8217;s what we need to save to the Variable.<\/li>\n<li>Now go to the Response Settings tab as below and Configure the Content-Length Header mapping. If it&#8217;s not showing in the Grid, most likely your Web Server doesn&#8217;t support the HEAD command, and you may need to use another method. For now, we will assume that just like most Web Servers, your API also supports the HEAD command.<\/li>\n<li>Here is the screenshot of the actual configuration on the Response Tab\n<div id=\"attachment_11603\" style=\"width: 768px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/REST-API-task-save-the-response-header.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-11603\" class=\"size-full wp-image-11603\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/REST-API-task-save-the-response-header.png\" alt=\"\" width=\"758\" height=\"732\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/REST-API-task-save-the-response-header.png 758w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/REST-API-task-save-the-response-header-300x290.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/a><p id=\"caption-attachment-11603\" class=\"wp-caption-text\">REST API task &#8211; save the response header<\/p><\/div><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this article, you will see how to use the\u00a0SSIS REST API Task to get the file size without actually downloading it. &nbsp; &nbsp; &nbsp; Prerequisites Before we look into the Step-By-Step section to get the file size from the URL, let\u2019s make sure you meet the following requirements. SSIS designer installed. Sometimes it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1897,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,11],"tags":[3,12,4],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>Tip \u2013 How to check file size before download from URL | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"Learn how to get File size from URL using SSIS without downloading actual file content. We will use REST API Task using HEAD method and Response Headers.\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Tip \u2013 How to check file size before download from URL | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"Learn how to get File size from URL using SSIS without downloading actual file content. We will use REST API Task using HEAD method and Response Headers.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ZappySys\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2017-08-24T17:47:18+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2025-10-30T23:42:36+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"180\" \/>\r\n\t<meta property=\"og:image:height\" content=\"180\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/zappysys\/\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/\",\"url\":\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/\",\"name\":\"Tip \u2013 How to check file size before download from URL | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png\",\"datePublished\":\"2017-08-24T17:47:18+00:00\",\"dateModified\":\"2025-10-30T23:42:36+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\"},\"description\":\"Learn how to get File size from URL using SSIS without downloading actual file content. We will use REST API Task using HEAD method and Response Headers.\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png\",\"width\":180,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tip \u2013 How to check file size before download from URL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"sameAs\":[\"http:\/\/www.zappysys.com\/\",\"https:\/\/www.facebook.com\/ZappySys\/\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tip \u2013 How to check file size before download from URL | ZappySys Blog","description":"Learn how to get File size from URL using SSIS without downloading actual file content. We will use REST API Task using HEAD method and Response Headers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/","og_locale":"en_US","og_type":"article","og_title":"Tip \u2013 How to check file size before download from URL | ZappySys Blog","og_description":"Learn how to get File size from URL using SSIS without downloading actual file content. We will use REST API Task using HEAD method and Response Headers.","og_url":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/","og_site_name":"ZappySys Blog","article_author":"https:\/\/www.facebook.com\/ZappySys\/","article_published_time":"2017-08-24T17:47:18+00:00","article_modified_time":"2025-10-30T23:42:36+00:00","og_image":[{"width":180,"height":180,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/zappysys\/","twitter_misc":{"Written by":"ZappySys","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/","url":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/","name":"Tip \u2013 How to check file size before download from URL | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png","datePublished":"2017-08-24T17:47:18+00:00","dateModified":"2025-10-30T23:42:36+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82"},"description":"Learn how to get File size from URL using SSIS without downloading actual file content. We will use REST API Task using HEAD method and Response Headers.","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-tip.png","width":180,"height":180},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/how-to-check-file-size-before-download-from-url\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Tip \u2013 How to check file size before download from URL"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","caption":"ZappySys"},"sameAs":["http:\/\/www.zappysys.com\/","https:\/\/www.facebook.com\/ZappySys\/","https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/"],"url":"https:\/\/zappysys.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/1707"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=1707"}],"version-history":[{"count":7,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/1707\/revisions"}],"predecessor-version":[{"id":11604,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/1707\/revisions\/11604"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/1897"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=1707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=1707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=1707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}