Skip to content

Commit 8237344

Browse files
committed
docs: add section titles
1 parent ea1b628 commit 8237344

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

user_guide_src/source/libraries/uploaded_files.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,20 +307,34 @@ version, use ``getMimeType()`` instead:
307307
Moving Files
308308
============
309309

310+
with Original Filename
311+
----------------------
312+
310313
Each file can be moved to its new location with the aptly named ``move()`` method. This takes the directory to move
311314
the 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+
319330
Once the file has been removed the temporary file is deleted. You can check if a file has been moved already with
320331
the ``hasMoved()`` method, which returns a boolean:
321332

322333
.. literalinclude:: uploaded_files/018.php
323334

335+
When Moving Fails
336+
-----------------
337+
324338
Moving an uploaded file can fail, with an HTTPException, under several circumstances:
325339

326340
- the file has already been moved

0 commit comments

Comments
 (0)