BlueWaveTechnologies / BlueWave

Web application used to create charts and dashboards using a graph database
MIT License
5 stars 3 forks source link

UploadService #257

Open pborissow opened 2 years ago

pborissow commented 2 years ago

Implement a new service endpoint to allow clients to transfer files to the server over HTTP. The service will be job based. Flow is as follows:

  1. Client initiates an upload job by posting details about the file (file name, size, date, MD5). Server responds with a jobID.
  2. Client transfers bytes specifying a byte offset and jobID. Server will write bytes to a file starting at the given byte offset. Server will check to ensure that total bytes transferred does not exceed initial file size specified when creating the jobID, and other obvious checks (e.g. byte offset is valid).

At any point, the client can request from the server the status of the upload job using the jobID. At a minimum, the server should return the total number of bytes associated with the file on the server. This will allow clients to start/stop/resume upload tasks.

As part of this ticket, we will implement a upload client that can be accessed via the Main class so we can implement a command line option like this: java -jar bluewave.jar -upload /path/to/file