Moving files from Azure Blob / Files storage to Azure FTP space - azure

Would like to know whether it is a feasible to move the folder ( with files ) from Azure blob/file storage to webapp root.
Scenario: Would like to replace gallery of images folder used by static HTML site for gallery section weekly using powershell.
Request suggestions or alternatives as not sure how to handle this in azure and schedule swapping of folders between blob and ftp.

You can use the BlobTrigger trigger with WebJob deployed on the same web app and copy the files from blob storage to the local file system.

Would like to replace gallery of images folder used by static HTML site for gallery section weekly using powershell.
Please try to store the images in Azure blob directly. We can access the images in Azure blob with 'Full public read access' mode or 'Public read access for blobs only' mode. Refer to this article for more details. Then we can use Scheduler Webjob to replace the images directly.

It wasn't clear to me exactly what you are trying to do. If you have a legacy app / adoption of FTP you can mount an FTP server on Azure File Storage. Or alternatively Blob Storage can be used for public data as described above. If you want a simple tool for interacting with Blob Storage then you can try Storage Explorer.

Related

Azure storage options to serve content on Azure Web App

I am a total newbie to Azure WebApps and storage, I need some clarification/confirmation. The main thing to take note of, my application (described below) requires a folder hierarchy. Blob is out of the question and file share doesn't allow anonymous access unless I use Shared Access Signature (SAS).
Am I understanding Azure storage correctly, it's either you fit into the Azure storage model or you don't?
Can anyone advise how I can achieve what's required by the CMS application as described below by using Blobs?
The only option I see is to find a way to change the CMS application so that it always has the SAS in the URL to every file it requests from storage in order to serve content on my Web App? If so, is it a problem if I set my SAS to expire sometime in the distant future?
https://<appname>.file.core.windows.net/instance1/site1/file1.jpg?<SAS>
Problem with using Blob
So far my understanding is that Blob storage doesn't allow "sub folders" as it's a container that holds unstructured data, therefore I'm unable to use this based on my application (described below) as it requires folder structure.
The problem with using File Share
File share seemed perfect as it allows for folder hierarchy, naturally that's what I've used.
However, no anonymous access is allowed for files stored in file storage, the access needs to be authorised. One way of authorising the access is to create a SAS on a file/share level with Read permission and then using that SAS URL to access the file.
Cannot access Windows azure file storage document
My application
I've created a Linux Web App running open source CMS application. This application allows creation of multiple websites, for each website's content such as images, docs, multimedia to be stored on a file server. These files are then served to the website via a defined URL.
The CMS application allows for a settings of the location where it should save its files, this would be a folder on the file server. It then creates a new sub folder for every site it hosts in that location.
Example folder hierarchy
/instance1
/site1
/file1
/file2
/site2
/file1
/file2
Am I understanding Azure storage correctly, it's either you fit into
the Azure storage model or you don't?
You can use Azure Storage Model for your CMS Application. You can use either Blob Storage or File Share
Can anyone advise how I can achieve what's required by the CMS
application as described below by using Blobs?
You can use Data Lake Gen 2 storage account if you want to use Azure Blob Storage.
Data Lake Gen 2 storage enables hierarchical namespace so that you can use subfolders in the Blob Storage as per your requirements
Problem with using Blob
Blob Storage allows subfolders if we use Data Lake Gen 2 storage account. You can enable Blob Public Anonymous access
The problem with using File Share
Azure File Share supports but does not allow public anonymous access. You can use Azure Managed Identity (System-Assigned) for your web app to access the Azure File Share.
Then your application would be able to access the Azure File Share without SAS token
The issue of not having real folders in a blob storage shouldn't be any issue for your use case. Just because it doesn't have your traditional folders doesn't mean it can't serve content on e.g. instance1/site1/file1. That's still possible but the instance1/site1/ will just be part of the name of the blob.
Tools like the Azure Portal or Storage Explorer will actually show folders by using the delimiter / and querying data that appears to be inside a folder by using the path as prefix.

Azure storage account, make the file public with public link to download file

I have developed an app for a client with an azure database, I have never before worked with azure so I have no idea what I'm doing, I am using the .NETAutoUpdater package as the updater and require the update file to be a zip on a public link. Is there any to do this using Azure Storage Accounts --> Blobs and just make the blob public with a link? again I have no idea what I am doing in azure so any assistance will be appreciated
Yes, this is definitely possible. From the list of your blobs, click the grey dots at the end of the line and choose "Change access level".
Then change the access level to "Blob". Now open the blob container and select its properties view.
As you can see it shows an URL like https://yourapp.blob.core.windows.net/yourblobcontainer. Files that are placed in this container will be downloadable via that URL. E.g. if you have a file named foo.bar it'll be available at https://yourapp.blob.core.windows.net/yourblobcontainer/foo.bar.
It is actually fairly simple and straightforward to do. Simply set the ACL of the blob container containing your zip file to either Blob (recommended) or Container and the blobs inside that container will be publicly accessible.
You can set the ACL of the blob container on the portal, using any available storage explorers or programmatically.

How to find the path to blob?

I want to export a machine learning model I created in Azure Machine Learning studio. One of the required input is "Path to blob beginning with container"
How do I find this path? I have already created a blob storage but I have no idea how to find the path to the blob storage.
you should be able to find this from the Azure portal. Open the storage account, drill down into blobs, then your container. Use properties for the context menu, the URL should be the path ?
You can also get this URL using Azure Storage Explorer(on-prem) Software.
Also through an Online version of Azure Storage Explorer
You can also simply guess the URL if you know the storage account name and container name
https://[storageaccount].blob.core.windows.net/[container]/[blob]

Store csv files on Azure blobs

I have few csv file present on my local system. I want to upload them into Azure blobs in a particular directory structure. I need to create the directory structure as well on azure.
Please suggest the possible options to achieve that.
1 - Create Your storage in Azure
2 - get Azure storage explorer
https://azure.microsoft.com/en-us/features/storage-explorer/
3- start the app, login and Navigate to your Blob
4- Drag and drop folder and files :)
basically this MS provided Software allows you to use your storage account in a classic folders and files structure

Azure Cloud Web Service, storage options

We are migrating our PHP website to Azure Cloud Web Service (Web Role).
Currently the website saves user submitted image files to the filesystem via drive letter access. These images are then served via a url e.g. content.example.com.
What options have I got id I want persistent file storage on an Azure Cloud Web Service.
I am currently assessing BLOB Storage for this.
Thanks
Blob storage is the right answer. Although you could convert your images in base64 and save them in Azure Sql as well, it is really not recommended.
Check: Azure, best way to store and deploy static content (e.g. images/css)? or Where to store things like user pictures using Azure? Blob Storage?
One of the options to reduce re-writing of your application is to mount blob-storage as a network drive. Here is some information how to do it: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx
Mounting of the drives can be done on Web-Role start-up task and can be scripted.

Resources