1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Reviewed base64 image upload support

- Added test cases to cover.
- Altered parsing logic to be a little less reliant on regex.
- Added new iamge repo method for creating from data.
- Added extension validation and additional type support.
- Done some cleanup of common operations within PageContent.
- Added message to API docs/method to mention image usage.

For #2700 and #2631.
This commit is contained in:
Dan Brown
2021-06-02 21:34:34 +01:00
parent 40ca50e44f
commit 39928e1c63
4 changed files with 119 additions and 44 deletions

View File

@ -60,6 +60,8 @@ class PageApiController extends ApiController
*
* Any HTML content provided should be kept to a single-block depth of plain HTML
* elements to remain compatible with the BookStack front-end and editors.
* Any images included via base64 data URIs will be extracted and saved as gallery
* images against the page during upload.
*/
public function create(Request $request)
{