mesh icon indicating copy to clipboard operation
mesh copied to clipboard

Upload multiple files at once

Open numito opened this issue 4 years ago • 4 comments

Gentics Mesh Version, operating system, or hardware.

  • v1.4.2

Operating System

  • Linux
  • MacOSX
  • Windows
  • Other, name?

JVM

  • Oracle JDK 1.8.0_100
  • Open JDK 1.8.0_100

Problem

You can't upload multiple files at once, you have to create a binary node for each file give it a name etc... There should be a way to store all files in an assets folder, and bulk upload them, the binary node would be automatically created, and the name set from the file name.

Reproducer

Expected behaviour and actual behaviour

numito avatar Oct 23 '20 14:10 numito

The API is lacking this feature. The UI however has support for multi-file uploads. There is currently no endpoint which directly creates nodes with binary data. Bulkupload in the API can easily be done using multiple requests.

Does your feedback relate to API or UI?

Jotschi avatar Nov 09 '20 11:11 Jotschi

Hi Johannes,

Thank you for the quick answer. Actually it relates to both, but maybe the UI is enough.
I have been thinking about this, I am just wondering if binary data should no just be a mandatory private/internal node, with a specific endpoint being able to bulk upload, download and query ? I don’t really see the use case of defining multiple binary data node types. By default when you install mesh, you have a binary_content node created, why would one want to create another type of binary content node.

Best regards,

Numa

Le 9 nov. 2020 à 12:46, Johannes Schüth [email protected] a écrit :

The API is lacking this feature. The UI however has support for multi-file uploads. There is currently no endpoint which directly creates nodes with binary data. Bulkupload in the API can easily be done using multiple requests.

Does your feedback relate to API or UI?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gentics/mesh/issues/1150#issuecomment-723963304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZXCF7HKFEGYLGGJO7MKUDSO7JCNANCNFSM4S4UT4PA.

numito avatar Nov 09 '20 11:11 numito

Yes, we have actually discussed this internally multiple times. A dedicated handling of assets would be welcome. There are however various things to consider (Permission-, branch-, webroot handling).

https://github.com/gentics/mesh-incubator/issues/163

Multiple binary fields in a node can be desired when not using webroot and wanting to store a gallery or something similar. But this could also be modelled differently. There were also requests in the past to enable binary fields for micronodes. It would be useful to have a binary field for the picture of a micronode that represents a vcard.

You may want to have multiple binary node schemas with different elasticsearch configurations. One schema could be used to process PDF documents and also use a specific stemmer configuration on the binary content. Other assets may not need binary content extraction. But so far I have not yet seen a installation that uses multiple schemas for binary data.

In general I think it would be a good idea to have a dedicated system for assets but I'm not yet sure how to implement it. So far other areas in Mesh have required more attention.

Jotschi avatar Nov 09 '20 12:11 Jotschi

Yes I understand the complexity. The problem is that a binary data should be treated at the same time as a field and as a node. It should be a node, to allow indexing, browsing, searching etc… and as a field inside microschemas and schemas.

The first response that comes to my mind, would be to have an assets/binary_content endpoint per project, which allows bulk upload and download, then you have an asset/binary_content field type (same level as text or html) that is allowed for schemas and microschemas. Because asset/binary_content is a node, you could have special property that tells it’s an inline node to allow direct upload.

I admit it’s tricky and maybe not that important.

Le 9 nov. 2020 à 13:07, Johannes Schüth [email protected] a écrit :

Yes, we have actually discussed this internally multiple times. A dedicated handling of assets would be welcome. There are however various things to consider (Permission-, branch-, webroot handling).

gentics/mesh-incubator#163 https://github.com/gentics/mesh-incubator/issues/163 Multiple binary fields in a node can be desired when not using webroot and wanting to store a gallery or something similar. But this could also be modelled differently. There were also requests in the past to enable binary fields for micronodes. It would be useful to have a binary field for the picture of a micronode that represents a vcard.

You may want to have multiple binary node schemas with different elasticsearch configurations. One schema could be used to process PDF documents and also use a specific stemmer configuration on the binary content. Other assets may not need binary content extraction. But so far I have not yet seen a installation that uses multiple schemas for binary data.

In general I think it would be a good idea to have a dedicated system for assets but I'm not yet sure how to implement it. So far other areas in Mesh have required more attention.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gentics/mesh/issues/1150#issuecomment-723972990, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZXCFZPW3RYBAUBZVJ5LDDSO7LQXANCNFSM4S4UT4PA.

numito avatar Nov 09 '20 14:11 numito