How to Generate a Temporary Link for a Private File

You can also rename a file or move it to another folder-like location in S3 Object Storage to help organise your data. For example, you might rename report.pdf to annual-report.pdf, or move an image from images/ to archive/images/.

In S3-compatible storage, files are usually identified using object keys, not a traditional file system. Typically, a folder-like location is a prefix in the object key. This means that renaming or moving a file involves copying it to a new object key and deleting the original (if needed).

How to Rename a File

Renaming a file changes the object key but leaves the content unchanged.

For example:

You can rename the file by selecting the Rename option in your storage panel. If not, the usual alternative is to copy the file to a new object key with the desired name.

Make sure that the renamed copy exists and can be opened or downloaded before deleting the original file.

How to Move a File to Another Location

Moving a file is changing its object key, so it appears to be under another folder-like prefix.

For example :

To move the file, copy it to the new object key. Once you’ve confirmed that the copied file is available and working, you can delete the original if you no longer need it.

Depending on the storage panel or S3-compatible tool you are using, the steps you are able to take may differ.

Why Does S3 Storage Use Copying to Rename or Move Files?

In a traditional file system , renaming or moving a file can change its location directly . In S3-compatible object storage, the object is identified by its key. Usually changing the key is done by creating a copy under the new key and optionally removing the old object.

For this reason, a rename or move operation may take longer for large files. During the operation, both the original and the copied object may exist, temporarily using additional storage space.

What Happens to the File URL After Renaming or Moving?

A file URL often includes the object's key. If you change that key, the new object may have a different URL.

For example:

Any website, application, script, or shared link that uses the old path may need to be updated. If the original object is deleted, its old URL may no longer work.

If the file is public, check the new URL after the operation. If it is private, make sure the application or user still has the required permissions to access it.

Important Things to Check Before Moving or Renaming Files

Can You Rename or Move a Folder?

Folder-like locations in S3 storage are generally based on object-key prefixes rather than traditional directories. Moving a folder-like location may therefore require copying the objects under that prefix to new keys and then deleting the original objects.

For example, moving objects from images/ to archive/images/ may require copying each relevant object to the corresponding destination key.

Before moving a large number of objects, verify which objects match the source prefix to avoid copying or deleting unrelated files.

What If the Storage Panel Does Not Have a Rename or Move Option?

Not every storage panel provides dedicated rename or move controls. If the option is unavailable, check whether the panel supports copying objects to a new name or location. Alternatively, an S3-compatible client or application may support the required operation.

The exact method depends on the tools and permissions available in your storage environment.