I don’t have any definite answer, but two possibilities.
You said your “field subdirectory” is “/working”. Are you actually including the leading “/” in the field? I am not including a slash in the field, just the subdirectory name. Assuming SC doesn’t strip double-slashes, is it possible the development and production environments treat a double-slash differently and it is breaking the path in production?
In looking at my project while writing this, I realized I accidentally had some double slashes in the advanced deployment paths due to cut & paste errors, and it works ok. So for a Windows server, it doesn’t seem to hurt anything if there are double-slashes in the path (either because SC strips them or the OS ignores them).
Second thought: Is there a permissions issue in production that is preventing the file from being written to the subdirectory?
I think I can definitively answer one part of your question about what wins if you do an Advanced Deployment. I have been ignoring the Documents Path in the Application → Settings screen and use a different path in advanced deployment. The path in the advanced deployment is the one that is used in production, and the one in Application → Settings is used when running the apps in development.
My Application → Settings is the default:
C:/Program Files/NetMake/v9-php81/wwwroot/scriptcase/file/doc
Using ‘mysubfolder’ in the ‘subdirectory for local storage’ and running in development the files get stored in:
C:/Program Files/NetMake/v9-php81/wwwroot/scriptcase/file/doc/mysubfolder
My Advanced deplyment is set with the following for images and doc paths:
/files/projectname/file/img
C:/Program Files/NetMake/v9-php81/wwwroot/files/projectname/file/doc
In my form I have the attachment(filename) → ‘subdirectory for local storage’ set to “mysubfolder”. The files end up in
"C:/Program Files/NetMake/v9-php81/wwwroot/files/projectname/file/doc/mysubfolder"
and images end up in:
C:/Program Files/NetMake/v9-php81/wwwroot/files/projectname/file/img/mysubfolder"