Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lazau Florin 74 posts 210 karma points
    Feb 27, 2017 @ 08:18
    Lazau Florin
    1

    Storing Form Files with IFileSystem

    Hi all,

    I'm trying to save my Forms data in blob using the official documentation https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/IFileSystem/

    Unfortunately, with the steps from official documentation in backoffice at forms sections I get this error:

    An error occured
    
    The argument must not be empty string.  Parameter name: blobName
    
    EXCEPTION DETAILS
    
    System.ArgumentException: The argument must not be empty string.  Parameter name: blobName STACKTRACE
    
     at Microsoft.WindowsAzure.Storage.Core.Util.CommonUtility.AssertNotNullOrEmpty(String paramName, String value) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Core\Util\CommonUtility.cs:line 142  at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.GetBlockBlobReference(String blobName, Nullable`1 snapshotTime) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Blob\CloudBlobContainer.Common.cs:line 276  at Our.Umbraco.FileSystemProviders.Azure.AzureFileSystem.OpenFile(String path)  at Umbraco.Forms.Data.Storage.FormStorage.GetForms(String folder)  at Umbraco.Forms.Web.Trees.FormTreeController.GetForms(FormDataCollection queryStrings, String path)  at Umbraco.Forms.Web.Trees.FormTreeController.GetTreeNodes(String id, FormDataCollection queryStrings)  at Umbraco.Web.Trees.TreeControllerBase.GetNodes(String id, FormDataCollection queryStrings)    at lambda_method(Closure , Object , Object[] )  at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)  at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End ---  at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End ---  at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End ---  at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
    --- End ---  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
    

    Any advice is appreciated.

    Thanks,

  • Lazau Florin 74 posts 210 karma points
    Feb 28, 2017 @ 12:25
    Lazau Florin
    0

    Hi all,

    Any updates here?

    Thanks a lot,

    Florin

  • Alex 4 posts 24 karma points
    Mar 10, 2017 @ 12:37
    Alex
    0

    Ditto the question. Another bug is that you cannot exactly follow the documented configuration.

    The following doesn't work and last parameter "useDefaultRoute" has to be commented out because Azure filesystem provider's constructor doesn't accept 5 arguments.

    <Provider alias="forms" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
        <Parameters>
            <add key="containerName" value="form-data"/>
            <add key="rootUrl" value="http://[ACCOUNTNAME].blob.core.windows.net/"/>
            <add key="connectionString" value="DefaultEndpointsProtocol=https;AccountName=[ACCOUNTNAME];AccountKey=[YOURACCOUNTKEY]"/>
            <!--
                Optional configuration value determining the maximum number of days to cache items in the browser.
                Defaults to 365 days.
            -->
            <add key="maxDays" value="365"/>
            <!--
                When true this allows the VirtualPathProvider to use the default "media" route prefix regardless 
                of the container name.
            -->
            <add key="useDefaultRoute" value="true"/>
        </Parameters>
    </Provider>
    

    On a totally another note, switching to azure filesystem provider has other effects on front end. At least one other bug is that content tree renders newly created forms twice. One version appears as usually and another under a tree note with form GUID

  • Alex 4 posts 24 karma points
    Mar 10, 2017 @ 15:08
    Alex
    0

    Hi Florin,

    I managed to solve this problem on our end. The problem was outdated nuget package. The package is beta/pre-release and by default doesn't show that it has updates. I ended up updating it to the latest version version - 0.5.8 Beta - Forms started to work correctly as per Umbraco documentation.

    https://www.nuget.org/packages/UmbracoFileSystemProviders.Azure/

  • Lazau Florin 74 posts 210 karma points
    Mar 10, 2017 @ 15:18
    Lazau Florin
    0

    Hi Alex,

    Unfortunately, I can't confirm that it works. I have just installed the latest Nuget package(0.5.8) and I still have the issue.

    With direct dll from this project https://github.com/JimBobSquarePants/UmbracoFileSystemProviders.Azure it works except that form attached files are stored in wrong place (in media container).

    Thanks, Florin

  • Alex 4 posts 24 karma points
    Mar 10, 2017 @ 15:43
    Alex
    0

    So, you don't get the error from your OP in some cases? At least that error got resolved in my case. Check what is the difference in your project when you install the nuget package and when reference dll files manually. What happens with your configuration files in both cases? I added package via nuget.

    Regarding Media folder, it should be controlled by this property:

    <add key="useDefaultRoute" value="true"/>
    

    Setting the value to false should fix/remove media folder. I haven't tested it though.

  • Lazau Florin 74 posts 210 karma points
    Mar 10, 2017 @ 16:22
    Lazau Florin
    0

    No, i still have the error massage.

    Thanks, Florin

Please Sign in or register to post replies

Write your reply to:

Draft