File storage

The Document storage method uploads files to several different servers to ensure redundancy and speed. This also means that a file has several URLs. That is why the Document Storage API returns a document ID, with which you can request the document URL. You should save the document ID, as it is the only way to get the right URL for the file. Look at the examples to get a better understanding of how this works.

You can upload documents using the method upload(), which takes a single argument:

string $input_name – the name of the file input, i.e. myfile for <input type="file" name="myfile" />.