You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have no problem uploading an image directly to Cloudinary, but when I upload via Directus (using Cloudinary as media storage), some images, particularly the image I attached with this bug report, they get stored to Cloudinary as "Raw" instead of "Image"
Here is the image:
when I upload directly to Cloudinary (by dragging and dropping the file), the image gets stored as "IMAGE"
original filename is used, "testxxx.JPG"
when I upload to Cloudinary via Directus, the image gets stored as "RAW"
original filename used, testxxx.JPG; directus renamed it as f532f750-f696-4bc8-8702-e48954896b2e.JPG
To Reproduce
Spin up a local instance of docker-based Directus
Integrate Cloudinary with the following .env variables:
Other services used:
mysql:5.7.8
redis:6
directus:10.12.0
Directus Version
v.10.12.0
Hosting Strategy
Self-Hosted (Docker Image)
Database
mysql:5.7.8
The text was updated successfully, but these errors were encountered:
DonCastillo
changed the title
Images get stored to cloudinary as "Raw" instead of "JPG" when uploading via Directus
Images get stored to cloudinary as "Raw" instead of "Image" when uploading via Directus
Jun 6, 2024
Cloudinary has confirmed that Directus is uploading some images using type "raw" rather than image and it results in the asset being treated as a binary file and therefore not displayable. I think the issue is related to capitalization of "JPG" in file extensions rather than "jpg" or "jpeg".
Good find on the extension casing! Looks like we indeed only compare the extension in it's original case against a list of lowercase, known image extensions. I've created a PR, if you have the possibility to test it for me, I'd be super grateful, as I don't have a cloudinary account flying around at the moment.
Describe the Bug
I have no problem uploading an image directly to Cloudinary, but when I upload via Directus (using Cloudinary as media storage), some images, particularly the image I attached with this bug report, they get stored to Cloudinary as "Raw" instead of "Image"
Here is the image:
![testxxx](https://private-user-images.githubusercontent.com/51107521/337451701-351dcb68-e44f-4550-aba3-8f68cab34f59.JPG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU0NzE4NjksIm5iZiI6MTcyNTQ3MTU2OSwicGF0aCI6Ii81MTEwNzUyMS8zMzc0NTE3MDEtMzUxZGNiNjgtZTQ0Zi00NTUwLWFiYTMtOGY2OGNhYjM0ZjU5LkpQRz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA0VDE3MzkyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwMGFlN2VmZGQ0Yjg2ZmE5NWFkZGQ2MTIyYzdjMWIzMWZiZDg0OWIyYTMzMzUyNGJmZmJkNzY1Y2ZiNjk1ZGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.rxmVTrvHr00talG4j6x8tZferiJU9w3GJ0cFDC56RzU)
when I upload directly to Cloudinary (by dragging and dropping the file), the image gets stored as "IMAGE"
![image](https://private-user-images.githubusercontent.com/51107521/337452484-d2b3cd68-4523-4052-9a11-b5840f467946.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU0NzE4NjksIm5iZiI6MTcyNTQ3MTU2OSwicGF0aCI6Ii81MTEwNzUyMS8zMzc0NTI0ODQtZDJiM2NkNjgtNDUyMy00MDUyLTlhMTEtYjU4NDBmNDY3OTQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA0VDE3MzkyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBmYTJkMDM1ZDliMTk1OThlZGRmYTMzZTEzOTUyYTc2YjZhNWVhODBkYzdlYjQ5NzY3OTU0NjliM2M0MzFiOGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.mLA_ju7w-HFEf2ut3MT43rmPxXKIsXMBqwk6k9BUj3Y)
original filename is used, "testxxx.JPG"
when I upload to Cloudinary via Directus, the image gets stored as "RAW"
![image](https://private-user-images.githubusercontent.com/51107521/337452923-ede98572-b967-490f-a630-96cd3f374244.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU0NzE4NjksIm5iZiI6MTcyNTQ3MTU2OSwicGF0aCI6Ii81MTEwNzUyMS8zMzc0NTI5MjMtZWRlOTg1NzItYjk2Ny00OTBmLWE2MzAtOTZjZDNmMzc0MjQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA0VDE3MzkyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcxNDM1OGUzNDYyNTBjNDUxNDljNzQ2YWVhMjM1ODI2ZDE2NmM1NDE3ZTFkYjEyN2IyMzc0NTMxNjFlOGU0NWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RXSEeKC0Rw2YfR3zVtRDpo09yiWpIpWUHlzO97LfHBU)
original filename used, testxxx.JPG; directus renamed it as f532f750-f696-4bc8-8702-e48954896b2e.JPG
To Reproduce
STORAGE_CLOUDINARY_DRIVER="cloudinary"
STORAGE_CLOUDINARY_ROOT="/testing"
STORAGE_CLOUDINARY_HEALTHCHECK_THRESHOLD=750
STORAGE_CLOUDINARY_CLOUD_NAME="...."
STORAGE_CLOUDINARY_API_KEY="...."
STORAGE_CLOUDINARY_API_SECRET="...."
STORAGE_CLOUDINARY_ACCESS_MODE="public"
FILES_MAX_UPLOAD_SIZE="100mb"
FILES_MIME_TYPE_ALLOW_LIST="/"
mysql:5.7.8
redis:6
directus:10.12.0
Directus Version
v.10.12.0
Hosting Strategy
Self-Hosted (Docker Image)
Database
mysql:5.7.8
The text was updated successfully, but these errors were encountered: