How is stored server id by filepond when using chunks?

41 views Asked by At

I'm trying to use Filepond with a php framework, and chunk uploading mode. Till now I've succeeded in uploading the chunks to an S3 disk, merge them and save. Though, I'm not sure how to move the file from tmp to real folder upon form submission. Usually it's really easy, just one or two lines of code, but this time I don't know how to get a reference to the file. Filepond docs say this:

  1. FilePond requests a transfer id from the server, a unique location to identify this transfer with. It does this using a POST request. The request is accompanied by the metadata and the total file upload size set to the Upload-Length header.

  2. server create unique location tmp/12345/

  3. server returns unique location id 12345 in text/plain response

  4. FilePond stores unique id 12345 in file item <<< what exactly does it mean?

  5. FilePond sends first chunk using a PATCH request

  6. FilePond sends chunks until all chunks have been uploaded succesfully.

  7. FilePond stores the unique id 12345 as the server id of this file. <<< what exactly does it mean? client submits the FilePond parent form containing the hidden input field with the unique id <<< such a field is not created in my form.

  8. server uses the unique id to move tmp/12345/my-file.jpg to its final location and remove the tmp/12345 folder

Wha exactly do points 4 and 7? What is "stores id in file item"? And then "stores the unique id 12345 as the server id of this file." And what is the "hidden input field" named? I checked the html source from console but no hidden field is created and populated in my form. So I'm quite confused.

0

There are 0 answers