CLOUD: Add "ajax" parameter for "/create" and "/upload"

If it's set, these redirect to "/filesAJAX" instead of "/files".
This commit is contained in:
Alexander Tkachev 2016-07-19 13:41:25 +06:00
parent e6caa482e1
commit da229dd84c
5 changed files with 26 additions and 7 deletions

View file

@ -159,9 +159,11 @@ void UploadFileClientHandler::handleBlockContent(Client *client) {
_("Uploaded successfully!"),
client->queryParameter("path").c_str(),
_("Back to parent directory")
),
"/files?path=" + LocalWebserver::urlEncodeQueryParameterValue(client->queryParameter("path"))
);
),
(client->queryParameter("ajax") == "true" ? "/filesAJAX?path=" : "/files?path=") +
LocalWebserver::urlEncodeQueryParameterValue(client->queryParameter("path"))
);
_state = UFH_STOP;
return;
}