Remote directory empty except for .ftpquota? - ftp

See attached - imported xml that the client sent over. Claims I'm successfully connected but then the directory is almost empty - no PublicHTML. Would this be on my end or would it have to do with how permissions for me are set in their CPanel? I imagine this means I was not given access to the root folder.

This means that you were given access to a Public_ftp folder where you can upload files and either a person or a script will move the uploaded files to the final destination folder.

Related

Azure bot framework Composer publish with own json data files

I am using json files to store data that is loaded by an LG function. I have the json files within a custom directory under the dialog folder e.g.
mybot/
dialogs/
mydialog/
knowledge-base
language-generation
language-understanding
myfolder/
myfile1.json
myfile2.json
The path I use is relative to the dialog folder e.g.
# MyTemplate(name)
- ${json(fromFile(concat("../../myfolder/",name)))}
Works when testing locally, fails when deployed to Azure webapp
mydialog.en-us.lg:Could not find a part of the path ‘D:\home\site\wwwroot\ComposerDialogs\dialogs\mydialog\myfolder\myfile1.json'
Anyone know what the correct path name should be?
I've tried several different locations for "myfolder" - none work.
I suspect the question should be "How do I tell Composer to include this folder when it builds and deploys the bot?".

Where to save application data in windows?

I am trying to make a windows application. In this application, some files get modified as a user add or delete an entry. I saved these files on the application folder itself.
But After making binary file I installed it, As I try to add a entry it get crashed.
So, I figured out the issue. The windows doesn't allow to modified files inside C:\Program Files.
So, I installed it in other drive and it works. It solved my issue temporarily but I want to know how other application works in windows.
Where do those applications save their data?
I am not talking about some data which get saved in "Documents" but something which is essential need to modified every time user makes change like theme, formates.
No user access is allowed to the "program folder", and that's for good: it is a system folder, and it should only be accessed for system related operations (like installing or uninstalling a program).
There are many places where "program data" can be stored depending on the situation, and QStandardPaths provides access to their paths, according to the category location. What you might be interested in are:
ConfigLocation: Returns a directory location where user-specific configuration files should be written. This may be either a generic value or application-specific, and the returned path is never empty.
AppDataLocation: Returns a directory location where persistent application data can be stored. This is an application-specific directory.
AppLocalDataLocation: As the previous one, but Windows specific.
AppConfigLocation: Returns a directory location where user-specific configuration files should be written. This is an application-specific directory, and the returned path is never empty.
Those paths (along with the others listed in the documentation) can be accessed using the following static methods:
standardLocations(locationType): returns a list of paths for the requested location type, in order of priority (the first is usually the preferred one);
writableLocation(locationType): returns the preferred path for which write access is allowed (usually the first of the standardLocations());
If you need to store the user configuration, you can use QStandardPaths.writableLocation(AppConfigLocation), while if you have some user-specific internal data that is used by the application (email database, document templates, etc) QStandardPaths.writableLocation(AppLocalDataLocation) should be a good choice.
In both cases, those paths may not exist, so you need to ensure that and eventually create them, possibly by using QDir(path):
dataPath = QtCore.QStandardPaths.writableLocation(AppLocalDataLocation)
dataPathDir = QtCore.QDir(dataPath)
if not dataPathDir.exists():
# create the directory (including parent directories if they don't exist);
# that the argument of mkpath is relative to the QDir's object path, so
# using '.' means that it will create the actual dataPath
dataPathDir.mkpath('.')
Note that for all of the above (especially the last 3) it's required that you correctly set both the organizationName and the applicationName.

Read "public" file content in a Revel app

I am currently writing a Go web app using Revel.
My app needs to read the content of an XML file which is stored on the server. At the moment, I store this file in the "public" folder where some other resources (css, js...) lie.
I am using ioutil.ReadFile to read the content of this file. While this is working when the server is run from the main app folder itself, I cannot figure how to access the file when the server is run from another location (say by running "revel run myapp" from $GOPATH).
Is there any way to deal with this situation in revel?
is there a generic way to know the path of the "public" folder?
Any hint would be appreciated.
Thanks! :)
The base path of the application is stored and accessible through revel.BasePath.
The "public" folder can thus be accessed through revel.BasePath + "/public/<...>".
This BasePath value is used, for example, in Static.Serve.

Google Drive api scope and file access (drive vs drive.files)

I have created two refresh tokens for me:
one for
SCOPE = 'https://www.googleapis.com/auth/drive'
and another
SCOPE = 'https://www.googleapis.com/auth/drive.file'
I'm trying to get information about files (using get method)
Some files I can get when using SCOPE drive.files, and some only when using wider scope drive
But I can not figure out what is the reason for that? Files are located in different folders but have one shared root folder.
The difference is that 'drive.file' only gives you permission to files that your app has created or the user has explicitly shared with your app, whereas 'drive' gives your app permission to see the all the files in the user's drive.
See
https://developers.google.com/drive/web/scopes
You should really look into using drive.file, that is where they are trying to push users. I was just fighting with this myself and found that if you use the drive.file scope, you can then subsequently open the file that is chosen using the API for the file type, but only if you set the correct AppID.
See here: https://developers.google.com/picker/docs/#gdata
This allows you to get past the 404 error that you get if you don't set the AppID.

IBM Connections Files CMIS: Unable to find object at path /My Files

I am using DotCMIS with no problem to connect to Alfresco and FileNet.
I registered for an IBM Connections account, added a few files via the web interface, and tried to connect to its CMIS endpoint https://greenhouse.lotus.com/files/basic/cmis/my/servicedoc
GetRepositories on this URL gives one repository, which in turn contain the two folders below:
My Files
My Folders
But when I run GetObjectByPath("/My Files") in the same repository, I get:
DotCMIS.Exceptions.CmisObjectNotFoundException was unhandled
Message=Not Found
Source=DotCMIS
ErrorContent=<?xml version="1.0" encoding="UTF-8"?><lcmis:error xmlns:lcmis="http://www.ibm.com/xmlns/prod/sn/cmis"><lcmis:code>objectNotFound</lcmis:code><lcmis:message>EJPVJ9023E: Unable to find object at path /My Files</lcmis:message><lcmis:userAction></lcmis:userAction></lcmis:error>
What does IBM Connections say Unable to find object at path /My Files despite My Files being a folder at the root of the repository?
The cmis:name property ("My Files", "My Folers") is localized. A non-English user would get different cmis:name property values for these two objects.
To fetch children from these resources, you need to build the path using the cmis:path property returned on each object or construct the path relative to its parent using the cmisra:pathSegment.
For example, the cmis:object for the resource labeled "My Files" in your scenario has the following:
<cmis:propertyString propertyDefinitionId="cmis:path"
localName="cmis_path" displayName="Path" queryName="cmis:path">
<cmis:value>/files</cmis:value>
</cmis:propertyString>
So to actually fetch the user's files, the path to call is the following:
GetObjectByPath("/files")
And to fetch the user's folders, the path to call is the following:
GetObjectByPath("/collections")
The net is to ensure you build paths using the cmisra:pathSegment or the cmis:path property, and not the cmis:name as this may not be valid in all scenarios (i.e. if the repository has same name siblings, etc.).

Resources