Hi Everyone, I am getting an error trying to uploa...
# lucee
g
Hi Everyone, I am getting an error trying to upload a wav file using cfscript / fileUpload() via TAFFY/REST
Copy code
result = fileUpload(savePath, "audioFile", "audio/wav,audio/x-wav,audio/vnd.wave", "MakeUnique");
I am getting the following error which I think is weird;
Copy code
When the value of the attribute STRICT is TRUE, only MIME types are allowed in the attribute(s): ACCEPT.
Because I AM including ONLY mimetypes in the Accept attribute / arg and fileUpload() doesn't have a strict attribute/arg! The payload has;
Copy code
Content-Disposition: form-data; name="audioFile"; filename="question3.wav"
Content-Type: audio/wav
any ideas?? - because I am stumped! THANKS!
z
sounds like a bug
g
Thanks @zackster It happens in 5.3.9.160 and 5.3.9.141 and 5.3.10-RC+79 I'll investigate some more in the morning - it is 0230 here ATM.
z
the tag cffile action=upload and function fileupload are the same code (with wrappers)
p
@gavinbaumanis I checked this issue and can't able to replicate the issue. So, please share a scenario where you faced the problem and it will help to replicate the issue.
g
I am not sure why it was failing. But I have converted the WAV file to a mono one, with less Hz - and it uploads fine. Is the file itself "inspected" at all? That is - is it possible that the actual format isn't what is tested for and that causes the error?
z
it's purely a mime type check
as far as i remember, strict via apache tika then checks by file extension, but doesn't actually inspect the contents
g
OK Thanks. Well I have no idea, then... I had a WAV file sent to me of unknown characteristics / content. I can play it. I can't upload it - I get the error message, above. (still a WAV) - I converted it to 8kHz && Mono && A-law. I can still play it. I can upload it successfully. I guess I dont really care - since for "me" I can upload it now.... But it still weird. I can send the two files and a couple of tests, if you like?