Windows Azure: How to create sub directory in a blob container










60














How to create a sub directory in a blob container



for example,



in my blob container http://veda.blob.core.windows.net/document/



If I store some files it will be




http://veda.blob.core.windows.net/document/1.txt



http://veda.blob.core.windows.net/document/2.txt




Now, how to create a sub directory




http://veda.blob.core.windows.net/document/folder/




So that I can store files




http://veda.blob.core.windows.net/document/folder/1.txt











share|improve this question




























    60














    How to create a sub directory in a blob container



    for example,



    in my blob container http://veda.blob.core.windows.net/document/



    If I store some files it will be




    http://veda.blob.core.windows.net/document/1.txt



    http://veda.blob.core.windows.net/document/2.txt




    Now, how to create a sub directory




    http://veda.blob.core.windows.net/document/folder/




    So that I can store files




    http://veda.blob.core.windows.net/document/folder/1.txt











    share|improve this question


























      60












      60








      60


      7





      How to create a sub directory in a blob container



      for example,



      in my blob container http://veda.blob.core.windows.net/document/



      If I store some files it will be




      http://veda.blob.core.windows.net/document/1.txt



      http://veda.blob.core.windows.net/document/2.txt




      Now, how to create a sub directory




      http://veda.blob.core.windows.net/document/folder/




      So that I can store files




      http://veda.blob.core.windows.net/document/folder/1.txt











      share|improve this question















      How to create a sub directory in a blob container



      for example,



      in my blob container http://veda.blob.core.windows.net/document/



      If I store some files it will be




      http://veda.blob.core.windows.net/document/1.txt



      http://veda.blob.core.windows.net/document/2.txt




      Now, how to create a sub directory




      http://veda.blob.core.windows.net/document/folder/




      So that I can store files




      http://veda.blob.core.windows.net/document/folder/1.txt








      c# azure directory azure-blob-storage






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 13 '18 at 2:03









      abatishchev

      69.1k69261392




      69.1k69261392










      asked Apr 11 '10 at 22:52









      vedaveda

      2,499104072




      2,499104072






















          8 Answers
          8






          active

          oldest

          votes


















          91














          To add on to what Egon said, simply create your blob called "folder/1.txt", and it will work. No need to create a directory.






          share|improve this answer
















          • 2




            how you filter or get all these files from "folder" ?
            – afr0
            Oct 16 '15 at 0:09






          • 1




            read my answer below @afr0
            – AntonB
            Jan 4 '16 at 23:40






          • 1




            This does not work for me, says containers cant use anything but lowercase, hyphens, numbers. Same for filenames
            – Green_qaue
            Feb 3 '17 at 14:16










          • @Green_qaue you have to use only lowercase letters and numbers for naming your container/directories and that's why you got errors.
            – Sapan Ghafuri
            Mar 4 '17 at 9:52






          • 1




            it creates several directories with the same folder, I mean each time I upload file, it create directory called "folder" again , is there any method to check if folder exist so it shouldn't create it?
            – amal50
            May 3 '18 at 0:34


















          29














          There is actually only a single layer of containers. You can virtually create a "file-system" like layered storage, but in reality everything will be in 1 layer, the container in which it is.



          For creating a virtual "file-system" like storage, you can have blob names that contain a '/' so that you can do whatever you like with the way you store. Also, the great thing is that you can search for a blob at a virtual level, by giving a partial string, up to a '/'.



          These 2 things, adding a '/' to a path and a partial string for search, together create a virtual "file-system" storage.






          share|improve this answer






















          • Can you share C# sample? blob.The name is read only property so we are not able to create a blob.Name with "/"
            – ABB
            Aug 8 '17 at 6:47


















          23














          There is a comment by @afr0 asking how to filter on folders..



          There is two ways using the GetDirectoryReference or looping through a containers blobs and checking the type. The code below is in C#



          CloudBlobContainer container = blobClient.GetContainerReference("photos");

          //Method 1. grab a folder reference directly from the container
          CloudBlobDirectory folder = container.GetDirectoryReference("directoryName");

          //Method 2. Loop over container and grab folders.
          foreach (IListBlobItem item in container.ListBlobs(null, false))

          if (item.GetType() == typeof(CloudBlobDirectory))

          // we know this is a sub directory now
          CloudBlobDirectory subFolder = (CloudBlobDirectory)item;

          Console.WriteLine("Directory: 0", subFolder.Uri);




          read this for more in depth coverage: http://www.codeproject.com/Articles/297052/Azure-Storage-Blobs-Service-Working-with-Directori






          share|improve this answer


















          • 1




            This should be the answer as of today's date. +1
            – MickyD
            Feb 13 '17 at 4:04



















          7














          In Azure Portal we have below option while uploading file :



          enter image description here






          share|improve this answer




























            2














            If you use Microsoft Azure Storage Explorer, there is a "New Folder" button that allows you to create a folder in a container.
            This is actually a virtual folder:



            enter image description here






            share|improve this answer




























              1














              As @Egon mentioned above, there is no real folder management in BLOB storage.



              You can achieve some features of a file system using '/' in the file name, but this has many limitations (for example, what happen if you need to rename a "folder"?).



              As a general rule, I would keep my files as flat as possible in a container, and have my application manage whatever structure I want to expose to the end users (for example manage a nested folder structure in my database, have a record for each file, referencing the BLOB using container-name and file-name).






              share|improve this answer




























                0














                Got similar issue while trying Azure Sample first-serverless-app.

                Here is the info of how i resolved by removing at front of $web.



                Note: $web container was created automatically while enable static website.
                Never seen $root container anywhere.



                //getting Invalid URI error while following tutorial as-is
                az storage blob upload-batch -s . -d $web --account-name firststgaccount01

                //Remove "" @destination param
                az storage blob upload-batch -s . -d $web --account-name firststgaccount01





                share|improve this answer






























                  -1














                  Here's how i do it in CoffeeScript on Node.JS:



                  blobService.createBlockBlobFromText 'containerName', (path + '$$$.$$$'), '', (err, result)->
                  if err
                  console.log 'failed to create path', err
                  else
                  console.log 'created path', path, result





                  share|improve this answer




















                  • The question is tagged as C#
                    – Dementic
                    Dec 19 '18 at 11:17










                  • @Dementic Hence my mention of CoffeeScript, which is just JavaScript without the cruft. Shouldn't be too hard to port to C#, especially compared to the accepted answer that is not even in a programming language.
                    – Cees Timmerman
                    Dec 20 '18 at 18:28











                  Your Answer






                  StackExchange.ifUsing("editor", function ()
                  StackExchange.using("externalEditor", function ()
                  StackExchange.using("snippets", function ()
                  StackExchange.snippets.init();
                  );
                  );
                  , "code-snippets");

                  StackExchange.ready(function()
                  var channelOptions =
                  tags: "".split(" "),
                  id: "1"
                  ;
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function()
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled)
                  StackExchange.using("snippets", function()
                  createEditor();
                  );

                  else
                  createEditor();

                  );

                  function createEditor()
                  StackExchange.prepareEditor(
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader:
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  ,
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  );



                  );













                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function ()
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f2619007%2fwindows-azure-how-to-create-sub-directory-in-a-blob-container%23new-answer', 'question_page');

                  );

                  Post as a guest















                  Required, but never shown

























                  8 Answers
                  8






                  active

                  oldest

                  votes








                  8 Answers
                  8






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  91














                  To add on to what Egon said, simply create your blob called "folder/1.txt", and it will work. No need to create a directory.






                  share|improve this answer
















                  • 2




                    how you filter or get all these files from "folder" ?
                    – afr0
                    Oct 16 '15 at 0:09






                  • 1




                    read my answer below @afr0
                    – AntonB
                    Jan 4 '16 at 23:40






                  • 1




                    This does not work for me, says containers cant use anything but lowercase, hyphens, numbers. Same for filenames
                    – Green_qaue
                    Feb 3 '17 at 14:16










                  • @Green_qaue you have to use only lowercase letters and numbers for naming your container/directories and that's why you got errors.
                    – Sapan Ghafuri
                    Mar 4 '17 at 9:52






                  • 1




                    it creates several directories with the same folder, I mean each time I upload file, it create directory called "folder" again , is there any method to check if folder exist so it shouldn't create it?
                    – amal50
                    May 3 '18 at 0:34















                  91














                  To add on to what Egon said, simply create your blob called "folder/1.txt", and it will work. No need to create a directory.






                  share|improve this answer
















                  • 2




                    how you filter or get all these files from "folder" ?
                    – afr0
                    Oct 16 '15 at 0:09






                  • 1




                    read my answer below @afr0
                    – AntonB
                    Jan 4 '16 at 23:40






                  • 1




                    This does not work for me, says containers cant use anything but lowercase, hyphens, numbers. Same for filenames
                    – Green_qaue
                    Feb 3 '17 at 14:16










                  • @Green_qaue you have to use only lowercase letters and numbers for naming your container/directories and that's why you got errors.
                    – Sapan Ghafuri
                    Mar 4 '17 at 9:52






                  • 1




                    it creates several directories with the same folder, I mean each time I upload file, it create directory called "folder" again , is there any method to check if folder exist so it shouldn't create it?
                    – amal50
                    May 3 '18 at 0:34













                  91












                  91








                  91






                  To add on to what Egon said, simply create your blob called "folder/1.txt", and it will work. No need to create a directory.






                  share|improve this answer












                  To add on to what Egon said, simply create your blob called "folder/1.txt", and it will work. No need to create a directory.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 12 '10 at 18:34









                  smarxsmarx

                  48.3k45971




                  48.3k45971







                  • 2




                    how you filter or get all these files from "folder" ?
                    – afr0
                    Oct 16 '15 at 0:09






                  • 1




                    read my answer below @afr0
                    – AntonB
                    Jan 4 '16 at 23:40






                  • 1




                    This does not work for me, says containers cant use anything but lowercase, hyphens, numbers. Same for filenames
                    – Green_qaue
                    Feb 3 '17 at 14:16










                  • @Green_qaue you have to use only lowercase letters and numbers for naming your container/directories and that's why you got errors.
                    – Sapan Ghafuri
                    Mar 4 '17 at 9:52






                  • 1




                    it creates several directories with the same folder, I mean each time I upload file, it create directory called "folder" again , is there any method to check if folder exist so it shouldn't create it?
                    – amal50
                    May 3 '18 at 0:34












                  • 2




                    how you filter or get all these files from "folder" ?
                    – afr0
                    Oct 16 '15 at 0:09






                  • 1




                    read my answer below @afr0
                    – AntonB
                    Jan 4 '16 at 23:40






                  • 1




                    This does not work for me, says containers cant use anything but lowercase, hyphens, numbers. Same for filenames
                    – Green_qaue
                    Feb 3 '17 at 14:16










                  • @Green_qaue you have to use only lowercase letters and numbers for naming your container/directories and that's why you got errors.
                    – Sapan Ghafuri
                    Mar 4 '17 at 9:52






                  • 1




                    it creates several directories with the same folder, I mean each time I upload file, it create directory called "folder" again , is there any method to check if folder exist so it shouldn't create it?
                    – amal50
                    May 3 '18 at 0:34







                  2




                  2




                  how you filter or get all these files from "folder" ?
                  – afr0
                  Oct 16 '15 at 0:09




                  how you filter or get all these files from "folder" ?
                  – afr0
                  Oct 16 '15 at 0:09




                  1




                  1




                  read my answer below @afr0
                  – AntonB
                  Jan 4 '16 at 23:40




                  read my answer below @afr0
                  – AntonB
                  Jan 4 '16 at 23:40




                  1




                  1




                  This does not work for me, says containers cant use anything but lowercase, hyphens, numbers. Same for filenames
                  – Green_qaue
                  Feb 3 '17 at 14:16




                  This does not work for me, says containers cant use anything but lowercase, hyphens, numbers. Same for filenames
                  – Green_qaue
                  Feb 3 '17 at 14:16












                  @Green_qaue you have to use only lowercase letters and numbers for naming your container/directories and that's why you got errors.
                  – Sapan Ghafuri
                  Mar 4 '17 at 9:52




                  @Green_qaue you have to use only lowercase letters and numbers for naming your container/directories and that's why you got errors.
                  – Sapan Ghafuri
                  Mar 4 '17 at 9:52




                  1




                  1




                  it creates several directories with the same folder, I mean each time I upload file, it create directory called "folder" again , is there any method to check if folder exist so it shouldn't create it?
                  – amal50
                  May 3 '18 at 0:34




                  it creates several directories with the same folder, I mean each time I upload file, it create directory called "folder" again , is there any method to check if folder exist so it shouldn't create it?
                  – amal50
                  May 3 '18 at 0:34













                  29














                  There is actually only a single layer of containers. You can virtually create a "file-system" like layered storage, but in reality everything will be in 1 layer, the container in which it is.



                  For creating a virtual "file-system" like storage, you can have blob names that contain a '/' so that you can do whatever you like with the way you store. Also, the great thing is that you can search for a blob at a virtual level, by giving a partial string, up to a '/'.



                  These 2 things, adding a '/' to a path and a partial string for search, together create a virtual "file-system" storage.






                  share|improve this answer






















                  • Can you share C# sample? blob.The name is read only property so we are not able to create a blob.Name with "/"
                    – ABB
                    Aug 8 '17 at 6:47















                  29














                  There is actually only a single layer of containers. You can virtually create a "file-system" like layered storage, but in reality everything will be in 1 layer, the container in which it is.



                  For creating a virtual "file-system" like storage, you can have blob names that contain a '/' so that you can do whatever you like with the way you store. Also, the great thing is that you can search for a blob at a virtual level, by giving a partial string, up to a '/'.



                  These 2 things, adding a '/' to a path and a partial string for search, together create a virtual "file-system" storage.






                  share|improve this answer






















                  • Can you share C# sample? blob.The name is read only property so we are not able to create a blob.Name with "/"
                    – ABB
                    Aug 8 '17 at 6:47













                  29












                  29








                  29






                  There is actually only a single layer of containers. You can virtually create a "file-system" like layered storage, but in reality everything will be in 1 layer, the container in which it is.



                  For creating a virtual "file-system" like storage, you can have blob names that contain a '/' so that you can do whatever you like with the way you store. Also, the great thing is that you can search for a blob at a virtual level, by giving a partial string, up to a '/'.



                  These 2 things, adding a '/' to a path and a partial string for search, together create a virtual "file-system" storage.






                  share|improve this answer














                  There is actually only a single layer of containers. You can virtually create a "file-system" like layered storage, but in reality everything will be in 1 layer, the container in which it is.



                  For creating a virtual "file-system" like storage, you can have blob names that contain a '/' so that you can do whatever you like with the way you store. Also, the great thing is that you can search for a blob at a virtual level, by giving a partial string, up to a '/'.



                  These 2 things, adding a '/' to a path and a partial string for search, together create a virtual "file-system" storage.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited May 25 '15 at 0:53









                  Eric Renouf

                  11.1k32348




                  11.1k32348










                  answered Apr 11 '10 at 23:21









                  EgonEgon

                  2,04532645




                  2,04532645











                  • Can you share C# sample? blob.The name is read only property so we are not able to create a blob.Name with "/"
                    – ABB
                    Aug 8 '17 at 6:47
















                  • Can you share C# sample? blob.The name is read only property so we are not able to create a blob.Name with "/"
                    – ABB
                    Aug 8 '17 at 6:47















                  Can you share C# sample? blob.The name is read only property so we are not able to create a blob.Name with "/"
                  – ABB
                  Aug 8 '17 at 6:47




                  Can you share C# sample? blob.The name is read only property so we are not able to create a blob.Name with "/"
                  – ABB
                  Aug 8 '17 at 6:47











                  23














                  There is a comment by @afr0 asking how to filter on folders..



                  There is two ways using the GetDirectoryReference or looping through a containers blobs and checking the type. The code below is in C#



                  CloudBlobContainer container = blobClient.GetContainerReference("photos");

                  //Method 1. grab a folder reference directly from the container
                  CloudBlobDirectory folder = container.GetDirectoryReference("directoryName");

                  //Method 2. Loop over container and grab folders.
                  foreach (IListBlobItem item in container.ListBlobs(null, false))

                  if (item.GetType() == typeof(CloudBlobDirectory))

                  // we know this is a sub directory now
                  CloudBlobDirectory subFolder = (CloudBlobDirectory)item;

                  Console.WriteLine("Directory: 0", subFolder.Uri);




                  read this for more in depth coverage: http://www.codeproject.com/Articles/297052/Azure-Storage-Blobs-Service-Working-with-Directori






                  share|improve this answer


















                  • 1




                    This should be the answer as of today's date. +1
                    – MickyD
                    Feb 13 '17 at 4:04
















                  23














                  There is a comment by @afr0 asking how to filter on folders..



                  There is two ways using the GetDirectoryReference or looping through a containers blobs and checking the type. The code below is in C#



                  CloudBlobContainer container = blobClient.GetContainerReference("photos");

                  //Method 1. grab a folder reference directly from the container
                  CloudBlobDirectory folder = container.GetDirectoryReference("directoryName");

                  //Method 2. Loop over container and grab folders.
                  foreach (IListBlobItem item in container.ListBlobs(null, false))

                  if (item.GetType() == typeof(CloudBlobDirectory))

                  // we know this is a sub directory now
                  CloudBlobDirectory subFolder = (CloudBlobDirectory)item;

                  Console.WriteLine("Directory: 0", subFolder.Uri);




                  read this for more in depth coverage: http://www.codeproject.com/Articles/297052/Azure-Storage-Blobs-Service-Working-with-Directori






                  share|improve this answer


















                  • 1




                    This should be the answer as of today's date. +1
                    – MickyD
                    Feb 13 '17 at 4:04














                  23












                  23








                  23






                  There is a comment by @afr0 asking how to filter on folders..



                  There is two ways using the GetDirectoryReference or looping through a containers blobs and checking the type. The code below is in C#



                  CloudBlobContainer container = blobClient.GetContainerReference("photos");

                  //Method 1. grab a folder reference directly from the container
                  CloudBlobDirectory folder = container.GetDirectoryReference("directoryName");

                  //Method 2. Loop over container and grab folders.
                  foreach (IListBlobItem item in container.ListBlobs(null, false))

                  if (item.GetType() == typeof(CloudBlobDirectory))

                  // we know this is a sub directory now
                  CloudBlobDirectory subFolder = (CloudBlobDirectory)item;

                  Console.WriteLine("Directory: 0", subFolder.Uri);




                  read this for more in depth coverage: http://www.codeproject.com/Articles/297052/Azure-Storage-Blobs-Service-Working-with-Directori






                  share|improve this answer














                  There is a comment by @afr0 asking how to filter on folders..



                  There is two ways using the GetDirectoryReference or looping through a containers blobs and checking the type. The code below is in C#



                  CloudBlobContainer container = blobClient.GetContainerReference("photos");

                  //Method 1. grab a folder reference directly from the container
                  CloudBlobDirectory folder = container.GetDirectoryReference("directoryName");

                  //Method 2. Loop over container and grab folders.
                  foreach (IListBlobItem item in container.ListBlobs(null, false))

                  if (item.GetType() == typeof(CloudBlobDirectory))

                  // we know this is a sub directory now
                  CloudBlobDirectory subFolder = (CloudBlobDirectory)item;

                  Console.WriteLine("Directory: 0", subFolder.Uri);




                  read this for more in depth coverage: http://www.codeproject.com/Articles/297052/Azure-Storage-Blobs-Service-Working-with-Directori







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 13 '17 at 19:51

























                  answered Jan 4 '16 at 23:43









                  AntonBAntonB

                  1,1081629




                  1,1081629







                  • 1




                    This should be the answer as of today's date. +1
                    – MickyD
                    Feb 13 '17 at 4:04













                  • 1




                    This should be the answer as of today's date. +1
                    – MickyD
                    Feb 13 '17 at 4:04








                  1




                  1




                  This should be the answer as of today's date. +1
                  – MickyD
                  Feb 13 '17 at 4:04





                  This should be the answer as of today's date. +1
                  – MickyD
                  Feb 13 '17 at 4:04












                  7














                  In Azure Portal we have below option while uploading file :



                  enter image description here






                  share|improve this answer

























                    7














                    In Azure Portal we have below option while uploading file :



                    enter image description here






                    share|improve this answer























                      7












                      7








                      7






                      In Azure Portal we have below option while uploading file :



                      enter image description here






                      share|improve this answer












                      In Azure Portal we have below option while uploading file :



                      enter image description here







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Nov 8 '17 at 6:32









                      PritamPritam

                      3991829




                      3991829





















                          2














                          If you use Microsoft Azure Storage Explorer, there is a "New Folder" button that allows you to create a folder in a container.
                          This is actually a virtual folder:



                          enter image description here






                          share|improve this answer

























                            2














                            If you use Microsoft Azure Storage Explorer, there is a "New Folder" button that allows you to create a folder in a container.
                            This is actually a virtual folder:



                            enter image description here






                            share|improve this answer























                              2












                              2








                              2






                              If you use Microsoft Azure Storage Explorer, there is a "New Folder" button that allows you to create a folder in a container.
                              This is actually a virtual folder:



                              enter image description here






                              share|improve this answer












                              If you use Microsoft Azure Storage Explorer, there is a "New Folder" button that allows you to create a folder in a container.
                              This is actually a virtual folder:



                              enter image description here







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered May 15 '17 at 9:40









                              Setyo NSetyo N

                              92011524




                              92011524





















                                  1














                                  As @Egon mentioned above, there is no real folder management in BLOB storage.



                                  You can achieve some features of a file system using '/' in the file name, but this has many limitations (for example, what happen if you need to rename a "folder"?).



                                  As a general rule, I would keep my files as flat as possible in a container, and have my application manage whatever structure I want to expose to the end users (for example manage a nested folder structure in my database, have a record for each file, referencing the BLOB using container-name and file-name).






                                  share|improve this answer

























                                    1














                                    As @Egon mentioned above, there is no real folder management in BLOB storage.



                                    You can achieve some features of a file system using '/' in the file name, but this has many limitations (for example, what happen if you need to rename a "folder"?).



                                    As a general rule, I would keep my files as flat as possible in a container, and have my application manage whatever structure I want to expose to the end users (for example manage a nested folder structure in my database, have a record for each file, referencing the BLOB using container-name and file-name).






                                    share|improve this answer























                                      1












                                      1








                                      1






                                      As @Egon mentioned above, there is no real folder management in BLOB storage.



                                      You can achieve some features of a file system using '/' in the file name, but this has many limitations (for example, what happen if you need to rename a "folder"?).



                                      As a general rule, I would keep my files as flat as possible in a container, and have my application manage whatever structure I want to expose to the end users (for example manage a nested folder structure in my database, have a record for each file, referencing the BLOB using container-name and file-name).






                                      share|improve this answer












                                      As @Egon mentioned above, there is no real folder management in BLOB storage.



                                      You can achieve some features of a file system using '/' in the file name, but this has many limitations (for example, what happen if you need to rename a "folder"?).



                                      As a general rule, I would keep my files as flat as possible in a container, and have my application manage whatever structure I want to expose to the end users (for example manage a nested folder structure in my database, have a record for each file, referencing the BLOB using container-name and file-name).







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Jun 6 '18 at 8:49









                                      Assaf S.Assaf S.

                                      3,05521015




                                      3,05521015





















                                          0














                                          Got similar issue while trying Azure Sample first-serverless-app.

                                          Here is the info of how i resolved by removing at front of $web.



                                          Note: $web container was created automatically while enable static website.
                                          Never seen $root container anywhere.



                                          //getting Invalid URI error while following tutorial as-is
                                          az storage blob upload-batch -s . -d $web --account-name firststgaccount01

                                          //Remove "" @destination param
                                          az storage blob upload-batch -s . -d $web --account-name firststgaccount01





                                          share|improve this answer



























                                            0














                                            Got similar issue while trying Azure Sample first-serverless-app.

                                            Here is the info of how i resolved by removing at front of $web.



                                            Note: $web container was created automatically while enable static website.
                                            Never seen $root container anywhere.



                                            //getting Invalid URI error while following tutorial as-is
                                            az storage blob upload-batch -s . -d $web --account-name firststgaccount01

                                            //Remove "" @destination param
                                            az storage blob upload-batch -s . -d $web --account-name firststgaccount01





                                            share|improve this answer

























                                              0












                                              0








                                              0






                                              Got similar issue while trying Azure Sample first-serverless-app.

                                              Here is the info of how i resolved by removing at front of $web.



                                              Note: $web container was created automatically while enable static website.
                                              Never seen $root container anywhere.



                                              //getting Invalid URI error while following tutorial as-is
                                              az storage blob upload-batch -s . -d $web --account-name firststgaccount01

                                              //Remove "" @destination param
                                              az storage blob upload-batch -s . -d $web --account-name firststgaccount01





                                              share|improve this answer














                                              Got similar issue while trying Azure Sample first-serverless-app.

                                              Here is the info of how i resolved by removing at front of $web.



                                              Note: $web container was created automatically while enable static website.
                                              Never seen $root container anywhere.



                                              //getting Invalid URI error while following tutorial as-is
                                              az storage blob upload-batch -s . -d $web --account-name firststgaccount01

                                              //Remove "" @destination param
                                              az storage blob upload-batch -s . -d $web --account-name firststgaccount01






                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Jul 1 '18 at 4:33

























                                              answered Jul 1 '18 at 4:20









                                              NaraNara

                                              49118




                                              49118





















                                                  -1














                                                  Here's how i do it in CoffeeScript on Node.JS:



                                                  blobService.createBlockBlobFromText 'containerName', (path + '$$$.$$$'), '', (err, result)->
                                                  if err
                                                  console.log 'failed to create path', err
                                                  else
                                                  console.log 'created path', path, result





                                                  share|improve this answer




















                                                  • The question is tagged as C#
                                                    – Dementic
                                                    Dec 19 '18 at 11:17










                                                  • @Dementic Hence my mention of CoffeeScript, which is just JavaScript without the cruft. Shouldn't be too hard to port to C#, especially compared to the accepted answer that is not even in a programming language.
                                                    – Cees Timmerman
                                                    Dec 20 '18 at 18:28
















                                                  -1














                                                  Here's how i do it in CoffeeScript on Node.JS:



                                                  blobService.createBlockBlobFromText 'containerName', (path + '$$$.$$$'), '', (err, result)->
                                                  if err
                                                  console.log 'failed to create path', err
                                                  else
                                                  console.log 'created path', path, result





                                                  share|improve this answer




















                                                  • The question is tagged as C#
                                                    – Dementic
                                                    Dec 19 '18 at 11:17










                                                  • @Dementic Hence my mention of CoffeeScript, which is just JavaScript without the cruft. Shouldn't be too hard to port to C#, especially compared to the accepted answer that is not even in a programming language.
                                                    – Cees Timmerman
                                                    Dec 20 '18 at 18:28














                                                  -1












                                                  -1








                                                  -1






                                                  Here's how i do it in CoffeeScript on Node.JS:



                                                  blobService.createBlockBlobFromText 'containerName', (path + '$$$.$$$'), '', (err, result)->
                                                  if err
                                                  console.log 'failed to create path', err
                                                  else
                                                  console.log 'created path', path, result





                                                  share|improve this answer












                                                  Here's how i do it in CoffeeScript on Node.JS:



                                                  blobService.createBlockBlobFromText 'containerName', (path + '$$$.$$$'), '', (err, result)->
                                                  if err
                                                  console.log 'failed to create path', err
                                                  else
                                                  console.log 'created path', path, result






                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Feb 19 '16 at 14:53









                                                  Cees TimmermanCees Timmerman

                                                  8,20935583




                                                  8,20935583











                                                  • The question is tagged as C#
                                                    – Dementic
                                                    Dec 19 '18 at 11:17










                                                  • @Dementic Hence my mention of CoffeeScript, which is just JavaScript without the cruft. Shouldn't be too hard to port to C#, especially compared to the accepted answer that is not even in a programming language.
                                                    – Cees Timmerman
                                                    Dec 20 '18 at 18:28

















                                                  • The question is tagged as C#
                                                    – Dementic
                                                    Dec 19 '18 at 11:17










                                                  • @Dementic Hence my mention of CoffeeScript, which is just JavaScript without the cruft. Shouldn't be too hard to port to C#, especially compared to the accepted answer that is not even in a programming language.
                                                    – Cees Timmerman
                                                    Dec 20 '18 at 18:28
















                                                  The question is tagged as C#
                                                  – Dementic
                                                  Dec 19 '18 at 11:17




                                                  The question is tagged as C#
                                                  – Dementic
                                                  Dec 19 '18 at 11:17












                                                  @Dementic Hence my mention of CoffeeScript, which is just JavaScript without the cruft. Shouldn't be too hard to port to C#, especially compared to the accepted answer that is not even in a programming language.
                                                  – Cees Timmerman
                                                  Dec 20 '18 at 18:28





                                                  @Dementic Hence my mention of CoffeeScript, which is just JavaScript without the cruft. Shouldn't be too hard to port to C#, especially compared to the accepted answer that is not even in a programming language.
                                                  – Cees Timmerman
                                                  Dec 20 '18 at 18:28


















                                                  draft saved

                                                  draft discarded
















































                                                  Thanks for contributing an answer to Stack Overflow!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid


                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.

                                                  To learn more, see our tips on writing great answers.





                                                  Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                  Please pay close attention to the following guidance:


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid


                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.

                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function ()
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f2619007%2fwindows-azure-how-to-create-sub-directory-in-a-blob-container%23new-answer', 'question_page');

                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  這個網誌中的熱門文章

                                                  How to read a connectionString WITH PROVIDER in .NET Core?

                                                  In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

                                                  Museum of Modern and Contemporary Art of Trento and Rovereto