Skip to content

Move file after chunked upload instead of copying #59458

@giomf

Description

@giomf

Tip

Help move this idea forward

  • Use the 👍 reaction to show support for this feature.
  • Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
  • Subscribe to receive notifications about status changes and new comments.

Is your feature request related to a problem? Please describe.

MOVE Operation of chunked upload copies file from staging area to destination instead of moving it.
This can lead to timeouts or delays the whole upload process.

Describe the solution you'd like

When the staging area and the destination are on the same partition, using move instead of copy could speed up the upload.

Additional context

Im not a php developer but tried to dig a little deeper.

In ChuningV2Plugin.php i can see how it distinguish between move and copy based on the fact if the file already exists. This does not cover my observation though. I uploaded a new file and it was copied in the end.
In fact tried to upload it first but it ran into a timeout. I increased the timeout and tried it again. Maybe the database entry was still there?

Also, what is the reason to copy to destination if the file already exists? Maybe to preserve the internal ID of the file in database?
Maybe anybody with more context can give insights here.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Enhancement.

    Projects

    Status

    Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions