mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +02:00
Merge pull request #12430 from birarda/feat/pending-content-archives
make filename regex less restrictive
This commit is contained in:
commit
1e36a5b218
2 changed files with 2 additions and 3 deletions
|
@ -54,7 +54,7 @@ $(document).ready(function(){
|
||||||
var fileFormData = new FormData();
|
var fileFormData = new FormData();
|
||||||
fileFormData.append('restore-file', files[0]);
|
fileFormData.append('restore-file', files[0]);
|
||||||
|
|
||||||
showSpinnerAlert("Restoring Content");
|
showSpinnerAlert("Uploading content to restore");
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/content/upload',
|
url: '/content/upload',
|
||||||
|
@ -65,7 +65,6 @@ $(document).ready(function(){
|
||||||
data: fileFormData
|
data: fileFormData
|
||||||
}).done(function(data, textStatus, jqXHR) {
|
}).done(function(data, textStatus, jqXHR) {
|
||||||
swal.close();
|
swal.close();
|
||||||
showRestartModal();
|
|
||||||
}).fail(function(jqXHR, textStatus, errorThrown) {
|
}).fail(function(jqXHR, textStatus, errorThrown) {
|
||||||
showErrorMessage(
|
showErrorMessage(
|
||||||
"Error",
|
"Error",
|
||||||
|
|
|
@ -2247,7 +2247,7 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
|
||||||
// check the file extension to see what kind of file this is
|
// check the file extension to see what kind of file this is
|
||||||
// to make sure we handle this filetype for a content restore
|
// to make sure we handle this filetype for a content restore
|
||||||
auto dispositionValue = QString(firstFormData.first.value("Content-Disposition"));
|
auto dispositionValue = QString(firstFormData.first.value("Content-Disposition"));
|
||||||
auto formDataFilenameRegex = QRegExp("filename=\"(\\S+)\"");
|
auto formDataFilenameRegex = QRegExp("filename=\"(.+)\"");
|
||||||
auto matchIndex = formDataFilenameRegex.indexIn(dispositionValue);
|
auto matchIndex = formDataFilenameRegex.indexIn(dispositionValue);
|
||||||
|
|
||||||
QString uploadedFilename = "";
|
QString uploadedFilename = "";
|
||||||
|
|
Loading…
Reference in a new issue