Closed sseppi closed 8 months ago
@sseppi shall we also consider images in a first step or only files? In any case: I think that the two have to be reviewed separately since images can be structured in arrays, while files are only single fields.
@pkritzinger for the moment the request is only related to the Documents. At the moment I don't see useful such an use case also for images.
Moreover the JSON schema actually differs, since the url field is translated only in the Documents and not in the ImageGallery propery.
What do you exaclty mean with the sentence below?
In any case: I think that the two have to be reviewed separately since images can be structured in arrays, while files are only single fields.
For now in the EventShort endpoint we have also the possibility to upoaod more files like for example all Slides of an event.
@sseppi oh sorry, I did not have that in mind. so basically, the logic between images/ files is the same :) but as you mentioned, let's start with files
Hi @MatteoBiasi ,
Paul and Matthias defined a first version of the design for the upload of a file in more than one language as you can see in the Figma file below:
Can you please make and effort estimation for the implementation of it? Do we have enough budget in the actual contract?
@sseppi @MatteoBiasi
Finalized Design, let's discuss it tomorrow.
https://www.figma.com/file/DmuP6Dbv5LzkCNOXrDnWIL/2023?type=design&node-id=1219%3A1707&mode=design&t=w7f2pj460jDlkLGO-1
Hi all (@gappc) I spent some time analyzing possible solutions to what we discussed last time. I still need support on this: 1) As far as the mockup shows, we need the files names. We currently do not have the possibility neither to get them through the upload, neither in the data fetch. 2) Following the first point, I tried to expand the upload function and therefore the EditListUpload, but it's a big change, should we consider edit/add on the useUpload utils, or should be handled separately? 3) The data structure for the new dialog requires a bit of heavy data manipulation, which is quite different from the present structure, I'm facing some problems in this regard, I ask: is EventDocumentCell the right place to do it? Or this manipulation should be placed elsewhere? 4) The aim is to send back in the PUT request the same document, with a different document name, for each language selected, which is how are now handled single language files. Is it enough or could it cause problems with the current backend structure?
Hi @a-crea,
I think it would be best if we schedule a meeting to discuss your questions. In the mean time, I'll try to provide some information.
General image / file upload for tourism API: you select files to upload using either a file chooser or a dropzone and then you upload documents to either https://api.tourism.testingmachine.eu/v1/FileUpload/Image or https://api.tourism.testingmachine.eu/v1/FileUpload (see definitions in .env
file). From the upload response you'll get a list of remote URLs. Then you set / update the URLs in your current document, which is eventually saved.
Here some more
useUpload
function. That means, you should know the filenames. Please let me know if I misunderstood or if the problem is another oneuseUpload
function just takes a list of files and uploads them to one of two endpoints, defined in .env
. On success, useUpload
returns a list of remote URLs where the files can be downloaded.
Actually the Data Browser does not allow to choose the languages where an uploaded file (eg. PDF) is visible.
The actual workflow foresees that the link to the uploaded document is stored only in the language where is uploaded. So, as can be seen in the screenshot below, each file has only one language associated:
Since we will have both cases:
it would be very helpful if, during the upload procedure, the user will have the possibility to choose the languages where the file should be visible. The data Browser should the store the link to the file only in the selected languages.
In that way the user will have to change only the document name in all languages and not upload every time the same file.
As example I share in the screenshot below how does it work in the old databrowser.