{"id":22881393,"url":"https://github.com/nicogis/azurefilestorexaf","last_synced_at":"2026-01-24T03:35:27.798Z","repository":{"id":80808295,"uuid":"509177028","full_name":"nicogis/AzureFileStoreXAF","owner":"nicogis","description":"Store FileData XAF (Web) in azure file ","archived":false,"fork":false,"pushed_at":"2024-10-29T17:03:35.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T00:54:00.578Z","etag":null,"topics":["azure-file-share","devexpress","filedata","webforms","xaf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicogis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-30T17:39:52.000Z","updated_at":"2024-10-29T17:03:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a963181-ecdd-4acc-a456-f573d6f1ec30","html_url":"https://github.com/nicogis/AzureFileStoreXAF","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicogis%2FAzureFileStoreXAF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicogis%2FAzureFileStoreXAF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicogis%2FAzureFileStoreXAF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicogis%2FAzureFileStoreXAF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicogis","download_url":"https://codeload.github.com/nicogis/AzureFileStoreXAF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978738,"owners_count":21834915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-file-share","devexpress","filedata","webforms","xaf"],"created_at":"2024-12-13T17:33:35.735Z","updated_at":"2026-01-24T03:35:22.761Z","avatar_url":"https://github.com/nicogis.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to: Store file attachments in the azure file instead of the database (XPO)\n\n- Add in agnostic module AzureFileDataModule\n\n```csharp\n/// \u003csummary\u003e \n/// Required method for Designer support - do not modify \n/// the contents of this method with the code editor.\n/// \u003c/summary\u003e\nprivate void InitializeComponent() {\n    // \n    // AzureFileStoreXAFModule\n    // \n    this.AdditionalExportedTypes.Add(typeof(DevExpress.Persistent.BaseImpl.BaseObject));\n    this.AdditionalExportedTypes.Add(typeof(DevExpress.Persistent.BaseImpl.FileData));\n    this.AdditionalExportedTypes.Add(typeof(DevExpress.Persistent.BaseImpl.FileAttachmentBase));\n    this.RequiredModuleTypes.Add(typeof(DevExpress.ExpressApp.SystemModule.SystemModule));\n    this.RequiredModuleTypes.Add(typeof(DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule));\n    this.RequiredModuleTypes.Add(typeof(AzureFileData.AzureFileDataModule));\n\n}\n```\n\n\n\n- Create a property in your BO\n\n```csharp\n    [DefaultClassOptions]\n    [FileAttachment(\"File\")]\n    public class FileSystemStoreObjectDemo : BaseObject\n    {\n        public FileSystemStoreObjectDemo(Session session) : base(session) { }\n        [Aggregated, ExpandObjectMembers(ExpandObjectMembers.Never), ImmediatePostData]\n        public AzureFileStoreObject File\n        {\n            get { return GetPropertyValue\u003cAzureFileStoreObject\u003e(\"File\"); }\n            set { SetPropertyValue\u003cAzureFileStoreObject\u003e(\"File\", value); }\n        }\n    }\n```\n\n\n- Set in web.config the name of share folder in azure and [connectionstring azure](https://docs.microsoft.com/it-it/azure/storage/files/storage-how-to-create-file-share?tabs=azure-portal) \n \n![Azurefile](AzureFileStoreXAF.Module/Images/AzureFile.png)\n\n```xml\n\u003c!--set share folder--\u003e\n\u003cadd key=\"ShareName\" value=\"\" /\u003e\n\n\u003c!--azure connection string --\u003e\n\u003cadd key=\"ConnectionString\" value=\"\" /\u003e\n```\n\n- Set parameter in start code (event login ect)\n```csharp\nAzureFileData.AzureFileDataModule.AzureFileConnectionString = ConfigurationManager.AppSettings[\"ConnectionString\"];\nAzureFileData.AzureFileDataModule.AzureFileShareLocation = ConfigurationManager.AppSettings[\"ShareName\"];\n```\n\nYou can upload file \u003e 4Mb but you must set in web.config\n```xml\n\n\u003csystem.web\u003e\n    \u003c!--Example 60 MB in bytes--\u003e\n\t\u003chttpRuntime requestValidationMode=\"2.0\" maxRequestLength=\"61440\" /\u003e\n\t\t\n.....\n\n...\n        \u003csecurity\u003e\n\t\t\u003crequestFiltering\u003e\n\t\t\t\u003c!--The default size is 30000000 bytes (28.6 MB). MaxValue is 4294967295 bytes (4 GB)--\u003e\n\t\t\t\u003c!-- Example 60 MB in bytes --\u003e\n\t\t\t\u003crequestLimits maxAllowedContentLength=\"61440000\" /\u003e\n\t\t\u003c/requestFiltering\u003e\n\t\u003c/security\u003e\n\u003c/system.webServer\u003e\n```\n\n\n\n![Azurefilefiledataxaf](AzureFileStoreXAF.Module/Images/AzureFileFiledataXAF.PNG)\n\n\n**Developed using only XAF (web) .NET Framework.**\n\n\n\n**Extra info**\n\nYou can also use SMB Azure file share so you can use this project [XAF How to store file attachments in the file system instead of the database](https://github.com/DevExpress-Examples/XAF_how-to-store-file-attachments-in-the-file-system-instead-of-the-database-xpo-e965)\n\nAzure Files offers fully managed file shares in the cloud that are accessible via the industry standard Server Message Block (SMB) protocol.\n- Sign in to the Azure portal.\n- Navigate to the storage account that contains the file share you'd like to mount.\n- Select File shares.\n- Select the file share you'd like to mount.\n- Select Connect.\n- Select the drive letter to mount the share to.\n- Copy the provided script.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicogis%2Fazurefilestorexaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicogis%2Fazurefilestorexaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicogis%2Fazurefilestorexaf/lists"}