Open czosel opened 2 years ago
Does this allow you to rename the files as well by supplying an ID
with a different name
?
Does this allow you to rename the files as well by supplying an
ID
with a differentname
?
Currently this is not intended. For this use-case you would have to delete the file and upload it again with the correct name.
But doesn't that go against the general caluma API where you can simply supply the same mutation with new values to change an existing resource?
mutation changeTitle {
SaveTextQuestion(input: { slug: "some-question", label: "cool new label" }) {
question {
id
}
}
}
The only 2 places where I had to implement or work with file uploads (TCS and alexandria) both required the renaming of files.
If it isn't much effort it might be worth doing it now, otherwise I guess we wait until its requested.
Does this allow you to rename the files as well by supplying an
ID
with a differentname
?Currently this is not intended. For this use-case you would have to delete the file and upload it again with the correct name.
Sorry for correcting you, but what @StephanH90 asks is indeed possible with the current backend implementation: If you provide a new name for a given file ID, it will rename it internally and do the work needed so the file is moved in Minio as well. See the update_answer_files()
implementation in the PR.
Oh sorry, for the incorrect feedback then! But this feature will not be part of the current ember-caluma implementation for now.
Oh sorry, for the incorrect feedback then! But this feature will not be part of the current ember-caluma implementation for now.
So what's the ember-caluma release plan for this? Just not ready jet, or is it delayed on purpose?
When using file questions, it is often desired that more that one file can be uploaded. Currently this is only possible in Caluma using TableQuestions, which doesn't yield a good UX when the table form consists of just one FileQuestion.
We'd propose to add a new question type "MultipleFileQuestion" which is very similar to the existing "FileQuestion", but allows uploading more than one file.
The API could look like this:
FileAnswer (existing, just for reference)
Request:
Response:
MultipleFileAnswer
Request:
Response: