Skip to content

Importing a folder from Cloudflare R2 will turn into a separate 0kb file. #3345

@ScoutLepog

Description

@ScoutLepog

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed. / 请使用英语提交,否则会被关闭。
  • Please do not modify this template :) and fill in all the required fields.

Cloudreve version

4.14.1

Pro or Community Edition

Community (Open Source)

Database type

MySQL

Browser and operating system

Chrome 145.0.0.0 on Windows 10

Steps to reproduce

  1. I bound a Cloudflare R2 storage instance to my storage policy, treating it as an "S3 storage." Upload and download functions worked correctly after testing.
  2. After binding, I changed the Blob storage directory to / (root directory). I found that existing files in the storage policy weren't synced; only files uploaded from Cloudreve to Cloudflare later showed up.
  3. After further investigation, I used the "Import External Directory" function in the "File" menu, which caused a problem.

✔️ Expected Behavior

All folders and files synced normally, without problems.

❌ Actual Behavior

Problem: After importing, only a folder with a purely numeric name was synced correctly; all other folders became 0kb files. Clicking download also resulted in a 0kb file named after the folder directory.

After importing, I was hesitant to delete the imported files because Cloudreve warned that this would affect the original files. I also tried this. I created a folder with a numeric name in the Cloudflare R2 control panel and adjusted the "Recursive Import Subdirectories" and "Extract Media Information" options.

However, the synced files were still 0kb files. Deleting these 0kb files in Cloudreve
did indeed affect the files in the R2 storage (so I dared not blindly delete other 0kb files that originally had folders). I then tried creating a new user and adjusting the "Recursive Import Subdirectories" and "Extract Media Information" options again, but the problem persisted.

Image Image Image Image Image

PS:The first image shows the folders to confirm they are indeed folders in R2.
The second image shows the 0kb files that were imported incorrectly.
The third image shows the only folder that was imported correctly.
The fourth and fifth images show the browser downloading the 0kb files.

Addition context information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions