JPG File Unsupported Media Type

Immediately after I pressed the download button, the unsupported media type error shows up in the console

I will try to see the error handler again and see what else can be found there

I run a photo printing business and trying to build this app to have customer upload their images from their phone without the need to come to my shop, really hope someone here could help me with this issue as this could make or break the app that I’m building

This might be not related, but the download progress prints a negative value (something like -0.59) when in coronium docs it is stated that this progress value should be between 0 and 1

Hi, could someone help me try to upload and download this file using the core upload and download function to check if it works? Im using digitalocean server, the upload function works fine, the download returns an unsupported media type error in the console.

Here is the link to the file, (a random wallpaper I found)
https://www.pexels.com/photo/daylight-forest-glossy-lake-443446

Some additional information,I printed the error code using the print(evt.error) function and it returns error code 415 in the console

Ichecked google and found out about this error code:

The HTTP  415 Unsupported Media Type  client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format.

The format problem might be due to the request’s indicated Content-Type or Content-Encoding, or as a result of inspecting the data directly.

I have had issues with JPGs captured on Android phones before when opening them with Photoshop. The Galaxy A3 was especially troublesome. I never figured out why, but I can tell you some phones probably write less-than-perfect JPGs.

I wonder if the Amazon S3 lite pkugin for coronium could solve this problem… Might wait for develephant to chime in here.

So I tried the S3 lite demo from develephant,and the file that didnt download using the coronium core download function now downloaded perfectly!

But now there is an error right after the fille got downloaded:

01:58:55.624  ERROR: Runtime error

01:58:55.624  bad argument #1 to ‘find’ (string expected, got table)

01:58:55.624  stack traceback:

01:58:55.624  [C]: in function ‘find’

01:58:55.624  ?: in function ‘ParseXmlText’

01:58:55.624  ?: in function ‘get_error_msg’

01:58:55.624  ?: in function <?:384>

Id like to purchase this plugin,but this error is causing another roadblock for me,really cant catch a break here…

Hi, What version of Coronium are you running? Does the file extension end in .jpg or .jpeg. (your example link is jpeg) have you tried other files with any success. Generally this has to do with compression issues, such as an embedded color profile from PS. But it could also be a hard limit in download size, which I think is adjustable in Coronium. The issue seems to ring a bell. S3 and Coronium are completely different backends. The XML issue is new and something to do with S3 change in XML being returned. Looking into it. -dev

Hi dev, glad that you re replying, :slight_smile: hope you re getting better!

Im using coronium 2.6.5 currently, I managed to solve the download issue by using your amazon s3 plugin, for the xml issue I create my own error handler function with the unhandlederror listener to handle the error and stop the app from crashing, so far it works but would be glad if you could update the plugin to fix the error :slight_smile:

Chris, did you ever get to the bottom of this issue? I’m running into the same thing, and can confirm from my testing the filesize is 99% likely the culprit. I was using the default camera settings on my mobile devices (> 10 megapixels) and while it would upload, I wasn’t able to download. Limiting the picture quality to ~5 megapixels, thus limiting the file size, allowed the file to be downloaded. 

If there is a way to remove the file size limit, that would be amazing. Let us know!

Has anyone found any solution or workaround for this issue? It’s becoming critical with my implementation.

Hi,

This patch should resolve the issue. If it does not, let me know. Unless you’re working with larger than 1MB downloads, you should generally skip this patch because it will consume slightly more memory.

Patch is only for Coronium Core 2.6.5 (you’ve been warned).

Instructions:

Log in to your Coronium Core server as the  coronium  user. Copy and paste the following one-liner into the console:

sudo wget https://coronium-core.s3.amazonaws.com/v2.6.5/patches/1/patch.sh && sudo chmod +x patch.sh && ./patch.sh

You will be instructed to reload Coronium at the end of the install. Make sure to do that or the changes won’t take effect.

A “little” delayed, but I hope it helps.

-dev

Dev …

wow, great to see you back on the forum… I was hoping your health would improve. I am hoping this is a sign it has!

In any case, wishing you the best!

Bob