-
-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi File Upload component for Vue.js to create an initial JSON or XML database #81
Comments
Repository: https://github.com/sirixdb/sirix-web-frontend |
Hi, I would take on this issue. Are there any custom validaitons you would like to have implemented? |
Hi Martin, hmm. I don't think so as you first will have to authenticate yourself to be able to upload something. It's a bit tricky to get the HTTP-server up and running together with Keycloak, but someone fixed the Docker and docker-compose scripts. I think what's missing is to include the test realm configuration in the docker-compose file. Then ideally you can run it and send requests. What you need to do first is: Doing a With both requests you have to provide the content-type ( |
I'd like to change the authorization OAuth2 flow for the web frontend, but so far you would have to use the password flow. |
Maybe you can use |
Yes I did use mentioned element, but came to a few issues here: If you want to have multiple files upload option with corresponding |
Yeah, I saw this earlier as I have no integration test for this. I guess I need a handler in front to handle multipart/form-data and then split at the first encountered content-typd of each file (and all files must either be XML files or JSON files). What do you think? I might find a bit of time tomorrow to fix this. |
Well, could you explain why you think multiple files are needed? I think that the initial DB should be created from 1 xml or json since I can't imagine, what could merging process possibly look like. As I have already mentioned before, as for security, I suggest processing all the data at the backend side and omit overhead of reading files on client. |
Yes, but a database might have a collection of resources. I thought it would be nice to simply upload a directory with a bunch of JSON or XML files into one XML or JSON database. So the database consists of multiple resources which somehow belong together :-) I've changed the server code, but have to figure out how to best test this... |
I see. The problem with uploading folder is its browser compatibility as it not included in HTML5 spec currently. We could use this, but it is not recommended for production usage. We can however allow uploading multiple files at once. The main question though remains: What content-type is the best to be used? Json / XML with additional reading overhead on client (will need some merging strategy from you) or I can send files as they are via multipart/form-data with your processing on server. |
It should be |
Oh, It's not about the |
I am not sure if I follow you with content-disposition type. I can definitely check, whether all files are either json or xml, that's not a problem and afterwards send it via |
Vert.x simple stores the uploaded files in an upload directory on the server. With the API I'm then importing these files into SirixDB. So, with the multipart content-type I know that a bunch of files might have to be handled (or Vert.x knows) and then I still have to know if they are XML or JSON files: |
I see. That seems like the way to go. Maybe a little improvement for your code: You don't actually have to iterate over all the files and then check if the total size equals js/xml count. Instead, with each iteration check, the content type and if it is for instance xml and jsonCount != 0 then you can return error immediatelly :) |
Yeah, right, thanks ;-) |
Hi @MartinTuroci, still interested in this? I'd love to move forward, but I myself currently also have not much spare time, sadly. Have a great weekend 👍 |
Hi @JohannesLichtenberger, unfortunately, I am still busy. I would love to look into this, but I cannot tell you when for sure. In case there is somebody else who is interested in this issue, go ahead. For the next 2 weeks at least, I will not be available. |
@MartinTuroci ah okay, no worries... maybe I'll find some time on my own :) but in any way, for testing I could also create a JSON and a XML database without the frontend 👍 |
@MartinTuroci still no time? However #Hacktoberfest is over and maybe it was for the Hacktoberfest!? |
No description provided.
The text was updated successfully, but these errors were encountered: