[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [BP][ENH] Tiki API: Add support for uploading new versions of files
"Bruno Kambere \(@kambereBr\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6896027b6ebc2_2cd603853980@gitlab-sidekiq-low-urgency-cpu-bound-v2-599474fc66-l8kgn.mail> |
Bruno Kambere pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki
Commits:
e0f7dd2a by Bruno Kambere at 2025-08-08T16:51:29+03:00
[BP][ENH] Tiki API: Add support for uploading new versions of files
---
* [BP][ENH] Tiki API: Add support for uploading new versions of files
---
* [BP][ENH] Tiki API: Add support for uploading new versions of files
---
* [ENH] Tiki API: Add support for uploading new versions of files
---
* [ENH] Tiki API: Add support for uploading new versions of files
See merge request tikiwiki/tiki!8049
See merge request tikiwiki/tiki!8235
See merge request tikiwiki/tiki!8236
See merge request tikiwiki/tiki!8237
- - - - -
2 changed files:
- lib/core/Services/File/Controller.php
- templates/api/docs/paths/galleries/upload.yaml
Changes:
=====================================
lib/core/Services/File/Controller.php
=====================================
@@ -95,7 +95,13 @@ class Services_File_Controller
}
$gal_info = $this->checkTargetGallery($input);
- $fileId = $input->update->int() ? $input->fileId->int() : false;
+
+ if (($input->update->int() || $input->upload->int()) && $input->fileId->int()) {
+ $fileId = $input->fileId->int();
+ } else {
+ $fileId = false;
+ }
+
$asuser = $input->user->text();
$title = $input->title->text();
$description = $input->description->text() ?: '';
=====================================
templates/api/docs/paths/galleries/upload.yaml
=====================================
@@ -13,6 +13,9 @@ post:
galleryId:
type: integer
description: The gallery ID where the file will be uploaded
+ fileId:
+ type: integer
+ description: The file ID to update. Provide this to upload a new version and replace the current file. If omitted, a new file will be created instead.
data:
type: file
description: file path to upload
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e0f7dd2a84682003136f0f8234ee07fa74a788f1
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e0f7dd2a84682003136f0f8234ee07fa74a788f1
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs