Hello I have some old code that adds an uploaded file to azure storage.
How can I adapt this to dynamically add a subfolder into the directory?
The subfolder should be called IdText, which is based on a textboxs value elsewhere.
So it would be something like: MainFolder/IdText/uploadedFile.txt. Here is the code I have:
Dim share as CloudFileShare = fileClient.GetShareReference("MainFolder" + "/")
Dim rootDir as CloudFileDirectory = share.GetRootDirectoryReference()
Dim cloudFile as CloudFile = rootDir.GetFileReference(uploadedFile.FileName)
Dim IdText = IdField.Text //this should be the name of the new subfolder I want to add
Dim fileStr As Stream = uploadedFile.PostedFile.InputStream
cloudFile.UploadFromStream(fileStr)
fileStr.Dispose()