File tree Expand file tree Collapse file tree
user_guide_src/source/libraries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,20 +307,34 @@ version, use ``getMimeType()`` instead:
307307Moving Files
308308============
309309
310+ with Original Filename
311+ ----------------------
312+
310313Each file can be moved to its new location with the aptly named ``move() `` method. This takes the directory to move
311314the file to as the first parameter:
312315
313316.. literalinclude :: uploaded_files/016.php
314317
315- By default, the original filename was used. You can specify a new filename by passing it as the second parameter:
318+ By default, the original filename was used.
319+
320+ with New Filename
321+ -----------------
322+
323+ You can specify a new filename by passing it as the second parameter:
316324
317325.. literalinclude :: uploaded_files/017.php
318326
327+ Check if the File Moved
328+ -----------------------
329+
319330Once the file has been removed the temporary file is deleted. You can check if a file has been moved already with
320331the ``hasMoved() `` method, which returns a boolean:
321332
322333.. literalinclude :: uploaded_files/018.php
323334
335+ When Moving Fails
336+ -----------------
337+
324338Moving an uploaded file can fail, with an HTTPException, under several circumstances:
325339
326340- the file has already been moved
You can’t perform that action at this time.
0 commit comments