mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +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();
|
||||
fileFormData.append('restore-file', files[0]);
|
||||
|
||||
showSpinnerAlert("Restoring Content");
|
||||
showSpinnerAlert("Uploading content to restore");
|
||||
|
||||
$.ajax({
|
||||
url: '/content/upload',
|
||||
|
@ -65,7 +65,6 @@ $(document).ready(function(){
|
|||
data: fileFormData
|
||||
}).done(function(data, textStatus, jqXHR) {
|
||||
swal.close();
|
||||
showRestartModal();
|
||||
}).fail(function(jqXHR, textStatus, errorThrown) {
|
||||
showErrorMessage(
|
||||
"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
|
||||
// to make sure we handle this filetype for a content restore
|
||||
auto dispositionValue = QString(firstFormData.first.value("Content-Disposition"));
|
||||
auto formDataFilenameRegex = QRegExp("filename=\"(\\S+)\"");
|
||||
auto formDataFilenameRegex = QRegExp("filename=\"(.+)\"");
|
||||
auto matchIndex = formDataFilenameRegex.indexIn(dispositionValue);
|
||||
|
||||
QString uploadedFilename = "";
|
||||
|
|
Loading…
Reference in a new issue