ConoHaにアップロードしたバイナリが正しく読み込めない

This article can be read in about 3 minutes.
PR

The purpose 

A binary file uploaded to a ConoHa server via the file manager failed to load correctly.

What actually happened was that when I tried to upload an AI model intended for AI (an AI-for-AI model) using a file manager and load it with JavaScript, it failed. (It wasn’t a 404 error or similar; it was a “malformed configuration” error, suggesting the file was corrupted.)

PR

対策

The files that failed to upload after actually being uploaded lacked extensions.

ConoHa’s file manager treats files without extensions as text files (ASCII).

Therefore, it’s necessary to force the system to recognize them as binary files during upload.

To do this, I’ll change the file extension locally before uploading.

The extension needs to be recognized as a binary file; *.bin works, I’ve confirmed that.

Change the file extension, then re-upload the file through the file manager.

Right-click the uploaded file, select “Rename,” and revert the extension to its original form.

After verifying the data has been loaded correctly, the process will be complete.

How to check the problem

The problem solved by the method described above is the uploading of files as ASCII when they should be uploaded as binary.

You can verify that the file was uploaded correctly by downloading the uploaded file and comparing it to the original local file. (If the files are identical, the problem likely lies elsewhere. If they differ, it might be due to other causes, but this issue is a possibility.)

WinMerge makes it easy to compare files.

WinMerge のダウンロード - WinMerge
2024-10-27 にリリースされた現在の WinMerge バージョン 2.16.44 のダウンロード。詳細な最新情報を知るためには、変更履歴とリリースノートをお読みください。
PR

Result

The binary file uploaded to the ConoHa server using the file manager was successfully loaded.

comment

Copied title and URL