2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FEATURE: Support backup uploads/downloads directly to/from S3.

This reverts commit 3c59106bac.
This commit is contained in:
Guo Xiang Tan 2018-10-15 09:43:31 +08:00
parent 6a59187ae8
commit 84d4c81a26
52 changed files with 1079 additions and 420 deletions

View file

@ -109,6 +109,14 @@ QUnit.test("ensures an authorized upload", assert => {
);
});
QUnit.test("skipping validation works", assert => {
const files = [{ name: "backup.tar.gz" }];
sandbox.stub(bootbox, "alert");
assert.not(validUpload(files, { skipValidation: false }));
assert.ok(validUpload(files, { skipValidation: true }));
});
QUnit.test("staff can upload anything in PM", assert => {
const files = [{ name: "some.docx" }];
Discourse.SiteSettings.authorized_extensions = "jpeg";