Project

General

Profile

Actions

Feature #10782

closed

Tiny MCE: Image Upload

Added by Benjamin Baer almost 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Enis Nuredini
Target version:
Start date:
22.06.2020
Due date:
% Done:

0%

Estimated time:
Discuss:
Prio Planung:
No
Vote:


Files

image.png View image.png 93.9 KB Carsten Rose, 05.05.2021 17:30
clipboard-202203191714-nhkkw.png View clipboard-202203191714-nhkkw.png 268 KB Carsten Rose, 19.03.2022 17:14
clipboard-202203191723-slnx4.png View clipboard-202203191723-slnx4.png 16.3 KB Carsten Rose, 19.03.2022 17:23

Related issues

Related to QFQ - Feature #12452: BaseURL: a) always with '/' at the end, b) Extension doc string brokenClosedCarsten Rose26.04.2021

Actions
Related to QFQ - Bug #14463: TinyMCE: FormElement.size = <width>,<height>ClosedEnis Nuredini03.07.202208.07.2022

Actions
Related to QFQ - Bug #14455: TinyMCE: Activate save button after upload picture over drag&dropClosedEnis Nuredini01.07.2022

Actions
Related to QFQ - Feature #15770: httpOrigin: Parameter missing in QFQ ConfigClosedCarsten Rose09.03.202312.03.2023

Actions
Actions #1

Updated by Benjamin Baer almost 4 years ago

  • Tracker changed from Support to Feature
Actions #2

Updated by Benjamin Baer almost 4 years ago

  • Description updated (diff)
Actions #3

Updated by Benjamin Baer almost 4 years ago

  • Project changed from 1 to QFQ
  • Preview deleted (No)
Actions #4

Updated by Benjamin Baer almost 4 years ago

Added working mockup.

mockup/tinyMCEUpload.html

Actions #5

Updated by Benjamin Baer over 3 years ago

  • Status changed from New to Feedback
  • Assignee changed from Benjamin Baer to Carsten Rose

Kurzes Status update ob noch was zu tun ist

Actions #6

Updated by Benjamin Baer almost 3 years ago

So wie es aussieht, braucht es nur noch optionen:

plugins: images
toolbar: images
menubar: insert
images_upload_url: 'postAcceptor.php',

Also muesste man nur diese images_upload_url auf eine QFQ API legen.

Laut branch f10782 gibt es einen proof of concept fuer den upload von carsten: extension/Classes/Api/pictureUpload.php

Es gibt auch eine Mockup api: https://git.math.uzh.ch/typo3/qfq/-/commit/faff7f631ba974405b8536f590ba2784bc309ff2

Im teachingtools ist drin:

<textarea [...] 
data-config='{
 "file_picker_types":"file image media" 
,"image_advtab":true
,"automatic_uploads":true
,"images_upload_url":"typo3conf\/ext\/qfq\/Classes\/Api\/pictureUpload.php" 
,"images_reuse_filename":true
,"branding":false
,"plugins":"code link lists searchreplace table textcolor textpattern visualchars image" 
,"toolbar":"code searchreplace undo redo | styleselect link table | fontselect fontsizeselect | bullist numlist outdent indent | forecolor backcolor bold italic | image | upload" 
,"menubar":false
,"statusbar":false
,"min_height":"400" 
,"max_height":"1200"}'>

dh. qfq/Classes/Api/PictureUpload.php scheint die aktuell verwendete API zu sein.

Actions #7

Updated by Carsten Rose almost 3 years ago

  • File image.png image.png added
  • Priority changed from Normal to High
  • Target version set to next3
Actions #8

Updated by Carsten Rose almost 3 years ago

Actions #9

Updated by Carsten Rose almost 3 years ago

  • Priority changed from High to Normal
Actions #10

Updated by Carsten Rose almost 3 years ago

  • Status changed from Feedback to New
Actions #11

Updated by Carsten Rose almost 3 years ago

  • Status changed from New to ToDo
Actions #12

Updated by Carsten Rose about 2 years ago

  • Assignee changed from Carsten Rose to Enis Nuredini
  • Target version changed from next3 to 355
Actions #13

Updated by Enis Nuredini about 2 years ago

  • Status changed from ToDo to In Progress
Actions #14

Updated by Enis Nuredini about 2 years ago

  • Status changed from In Progress to Feedback
  • Assignee changed from Enis Nuredini to Carsten Rose

-Über die Parameter kann ein eigener Pfad für die Uploads angegeben werden.
-Dateinamen der Uploads werden wenn nötig angepasst, überschreiben von vorhandenen Uploads somit nicht möglich.
-Dokumentation für eigene Pfad Eingabe erweitert.
Merge Request wurde gemacht.

Actions #15

Updated by Carsten Rose about 2 years ago

  • Die Unit Tests liefen nicht durch.
  • Ich habe einige Punkte angepasst - damit laufen nun sie auf dem GIT Server durch.
  • Bitte den Branch `f10782-UploadImageInTinyMCE` neu ausschecken.
  • Damit sie bei mir lokal laufen muss ich einen Test anpassen. ich weiss nicht wie es bei dir ist.
  • Problem fuer den UNIT Test ist der abschliessende Slash in BaseURL. Dafuer gibt es ein Ticket #12452
  • Generell: Damit ein Merge Request akzeptiert wird, muessen die Unit Tests ok sein.
  • Gitlab: der Merge Request brach im Webinterface immer ab - ich habe keine Fehlermeldung gefunden, es gab immer nur Merge Failed.
  • Ich habe den alten Merge Request geloescht und einen neuen angelegt.
  • Beim testen des Codes ist folgendes aufgefallen:
    • Brauchen wir wirklich eine neue Konfigurationsvariable `httpOrigin` - koennen wir die nicht aus der BaserUrl uebernehmen?
    • In der QFQ Config hast du in der Erklaerung 'webwork16` aufgefuehrt, das sollten wir nicht machen (siehe screenshot) - verstehst du warum das keine gute Idee ist?

  • `extension/Classes/Api/pictureUpload.php`
    • Line 79: Anstelle von "../../../../../" bitte eine Funktion aus `extension/Classes/Core/Helper/Path.php` verwenden.
    • Line 82: mkdir kann (vermutlich) immer nur eine Verzeichnis anlegen, konfiguriert der App Entwickler z.B. `fileadmin/mein/neues/verzeichnis/mit/mehreren/neuen/subdirs` knallt es. Bitte `HelperFile::mkDirParent()` benutzen.
    • Line 82: Fehlermeldungen mit `@` wegzudruecken und dann keinen Check auf Erfolg zu machen ist keine gute Idee. Erledigt sich mit `HelperFile::mkDirParent()`.

Bitte eine neuen Merge Request erstellen wenn wir entschieden haben ob httpOrigin von baseUrl abgeleitet werden kann oder nicht.

Actions #16

Updated by Carsten Rose about 2 years ago

  • Related to Feature #12452: BaseURL: a) always with '/' at the end, b) Extension doc string broken added
Actions #17

Updated by Carsten Rose almost 2 years ago

  • Target version changed from 355 to 22.5.0
Actions #18

Updated by Carsten Rose almost 2 years ago

  • Target version changed from 22.5.0 to 22.5.feedback-enis
Actions #19

Updated by Enis Nuredini over 1 year ago

  • Status changed from Feedback to Ready to sync (develop)
  • Prio Planung set to No
Actions #20

Updated by Carsten Rose over 1 year ago

  • Related to Bug #14463: TinyMCE: FormElement.size = <width>,<height> added
Actions #21

Updated by Carsten Rose over 1 year ago

  • Related to Bug #14455: TinyMCE: Activate save button after upload picture over drag&drop added
Actions #22

Updated by Enis Nuredini over 1 year ago

Zum Kommentar Nr. 15
1. und 2. Bei mir laufen die Unit Tests durch. Funktion eingebaut für das automatische setzen des '/' am Ende der baseUrl. Entsprechend Unit Test auf diesen angepasst.
3. und 4. ? Snapshot lief durch. Falls nochmals passiert dann brauch ich genauere Angaben.
5. Am 16.09.2022 noch besprochen dass httpOrigin Konfiguration drin bleibt. Wird verwendet für den Abgleich mit der Server Variable beim Image Upload.
6. Erklärung webwork16 wurde schon ersetzt.
7. "../../../../../" wurde mit bestehender Funktion ersetzt.
8. mkdir wurde mit HelperFile::mkDirParent() ersetzt.

Neu:
5. httpOrigin wurde nachträglich aus der Config entfernt und wird dynamisch anhand der BaseUrl gesetzt.

Actions #23

Updated by Carsten Rose over 1 year ago

  • Status changed from Ready to sync (develop) to Closed
  • Target version changed from 22.5.feedback-enis to 22.10.0
Actions #24

Updated by Carsten Rose about 1 year ago

  • Related to Feature #15770: httpOrigin: Parameter missing in QFQ Config added
Actions

Also available in: Atom PDF