stable
Clone or download
Read-only
Part of story #36484 create a new project from an XML template To ease the review, the upload which use Tus will be done in a dedicated contribution. We need to save the file to upload information to be able uploading it after. How to test: - Enable the feature flag => `tuleap config-set feature_flag_create_from_custom_archive 1` - make dev-forgeupgrade && make composer && make dev-clear-cache - Play with POST project_files REST route in API Explorer (no need to upload file) => The route return the upload href => The 'file' stored in DB should have the right name and size given, the user_id should be the id of the user who make the request. Change-Id: I4b4504944f6fccb46c25a21b3bb6518285f38ae5
Modified Files
Name | ||||
---|---|---|---|---|
M | src/common/Config/GetConfigKeys.php | +2 | −0 | Go to diff View file |
A | src/common/Project/REST/v1/File/CreatedFileRepresentation.php | +32 | −0 | Go to diff View file |
A | src/common/Project/REST/v1/File/ProjectFilePOSTRepresentation.php | +45 | −0 | Go to diff View file |
A | src/common/Project/REST/v1/ProjectFileResource.php | +92 | −0 | Go to diff View file |
A | src/common/Project/Registration/Template/CustomProjectArchiveFeatureFlag.php | +44 | −0 | Go to diff View file |
A | src/common/Project/Registration/Template/Upload/FileOngoingUploadDao.php | +41 | −0 | Go to diff View file |
A | src/common/Project/Registration/Template/Upload/FileToUpload.php | +38 | −0 | Go to diff View file |
A | src/common/Project/Registration/Template/Upload/InsertFileToUpload.php | +41 | −0 | Go to diff View file |
A | src/common/Project/Registration/Template/Upload/ProjectFileToUploadCreator.php | +54 | −0 | Go to diff View file |
A | src/common/Project/Registration/Template/Upload/SaveFileUpload.php | +28 | −0 | Go to diff View file |
M | src/common/REST/ResourcesInjector.class.php | +9 | −4 | Go to diff View file |
M | src/db/mysql/database_structure.sql | +9 | −0 | Go to diff View file |
A | src/db/mysql/updates/2024/202402131221_add_project_file_upload_table.php | +44 | −0 | Go to diff View file |
A | tests/unit/common/Project/Registration/Template/CustomProjectArchiveFeatureFlagTest.php | +44 | −0 | Go to diff View file |
A | tests/unit/common/Project/Registration/Template/Upload/FileToUploadCreatorTest.php | +48 | −0 | Go to diff View file |
A | tests/unit/common/Project/Registration/Template/Upload/SaveFileUploadStub.php | +40 | −0 | Go to diff View file |