Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload not working on server running Windows (Encoding format (tmp) is not supported.) #101

Closed
dimalebid opened this issue Mar 4, 2023 · 10 comments · Fixed by #102
Closed

Comments

@dimalebid
Copy link

dimalebid commented Mar 4, 2023

Why are you immediately closing the topic? the issue is not resolved with the problem "Encoding format (tmp) is not supported."! the problem is in the plugin, as it seems to me, and not in https://github.com/Intervention/image

You are using a package in which the error or something has changed there.

@dimalebid
Copy link
Author

vendor/ctessier/nova-advanced-image-field/src/TransformableImage.php on the line 167

$this->image->save(); replaced with $this->image->save('public',80, 'jpg');

The error has gone, but there is God, does not save the cut -up picture, retains oreginal.

Use AdvancedImage::make('Photo')->croppable()

@ctessier
Copy link
Owner

ctessier commented Mar 5, 2023

Hello @dimalebid,

I closed your issue because it was not proven yet that it is related to the package. I was never able to reproduce it. It was raised multiple times and the same issue in the Intervention repo is still opened, meaning it was not solved on their side yet either.

Are you able to provide to me the image your are working with? Please make sure the file has a defined extension.

I cannot make the modification you suggest, as it forces the output's quality and extension.

@dimalebid
Copy link
Author

dimalebid commented Mar 5, 2023

Hello @ctessier I am using code: AdvancedImage::make('Photo')->croppable() https://prnt.sc/MtPKCtEz7qCk (like this). Where can I specify the image format? maybe some other code is needed to make it work properly?

@ctessier
Copy link
Owner

ctessier commented Mar 5, 2023

Hello @ctessier I am using code: AdvancedImage::make('Photo')->croppable() https://prnt.sc/MtPKCtEz7qCk (like this). Where can I specify the image format? maybe some other code is needed to make it work properly?

The way you use the package doesn't really matter. It just takes the original file and use Intervention to transform it and save it. Nothing is changed in terms of format or extension.

Do you have this error with all your images? I guess not.

A simple Google search gave me this result: https://stackoverflow.com/a/50067359/2291873
Please check your file properties (including name and MIME type).

@dimalebid
Copy link
Author

dimalebid commented Mar 6, 2023

https://drive.google.com/file/d/1W-0efGWBJ2vwJ1pSDaIyGeRWzEnPZul3/view?usp=share_link
"laravel/framework": "^9.19",
"laravel/nova": "~4.0",
"ctessier/nova-advanced-image-field": "^2.0.2",

Images:
https://drive.google.com/file/d/1x0SS6AJzRQRGwUx3NsuzFSqammr5cUAO/view?usp=share_link
https://drive.google.com/file/d/11f6mQrstQjqF2Mbpw8o7LIwEU18aTkcz/view?usp=share_link

Developing on localhost (OpenServer)

@ctessier
Copy link
Owner

ctessier commented Mar 7, 2023

https://drive.google.com/file/d/1W-0efGWBJ2vwJ1pSDaIyGeRWzEnPZul3/view?usp=share_link "laravel/framework": "^9.19", "laravel/nova": "~4.0", "ctessier/nova-advanced-image-field": "^2.0.2",

Images: https://drive.google.com/file/d/1x0SS6AJzRQRGwUx3NsuzFSqammr5cUAO/view?usp=share_link https://drive.google.com/file/d/11f6mQrstQjqF2Mbpw8o7LIwEU18aTkcz/view?usp=share_link

Developing on localhost (OpenServer)

Thank you @dimalebid for all these details.
I cannot reproduce on my end (using WSL and DevContainers) but I have a trail. Is your server running on Windows?

@dimalebid
Copy link
Author

yes

@ctessier
Copy link
Owner

ctessier commented Mar 7, 2023

Please try that branch and let me know: composer require "ctessier/nova-advanced-image-field":"dev-fix-unsupported-format-windows"

I couldn't reproduce as I am not on Windows but I think it might do the job.
Like you suggested in a previous comment, forcing the path seems to help, otherwise the extension cannot be resolved for some reason on Windows and ends up being tmp, which is not supported.

I still think this is a issue with Intervention, but let's see if that workaround helps.
Thank you for your help 😉

@dimalebid
Copy link
Author

Hello, yes it works great

@ctessier
Copy link
Owner

ctessier commented Mar 8, 2023

Hello, yes it works great

Great, thank you!
I'll try to publish a new version tonight.

Thank you again for your help!

@ctessier ctessier changed the title Problem in the library Upload not working on server running Windows (Encoding format (tmp) is not supported.) Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants