Corrupt File Upload - file-upload

For our ecommerce store, we have a backend that allows employees to upload product shots. These images are then resized to fit the design of the website.
For a while now we've been having an issue with some very weird distortion in the images. Here is a sample of the distortion:
Reuploading the image usually fixes the problem, but it's been getting worse and worse.
Today, I took at look at the original uploaded files, and I see that the distortion is there in the original file. I know that they are not being uploaded like that, so the corruption is happening during the upload. Any idea what might cause this?
The originals are produced in Photoshop on Mac, and uploaded using Firefox on a Mac.
Here is the code that uploads the file
<cffile action="UPLOAD"
filefield="form.imageFile"
destination="#UploadPath#"
nameconflict="makeunique"
accept="image/gif, image/pjpeg, image/jpeg, image/jpg, application/pdf">

So as it turns out, the issue is was specific to that computer and that browser. Seems that that specific Firefox was corrupting files randomly on upload.
Using a different browser, even on that same machine, has resolved all the issues.

Related

Safari won't play video from s3 despite 206 response

I am displaying a video with the html5 video element. The source is a pre-signed url from Wasabi s3. It works well on Chrome but it won't play on Safari. I did some research and it seems like this is usually due to the server not being configured to return a 206 code. However, I did check the server and it seems to support byte-range requests.
Here is the network tab. Any help would be greatly appreciated.
Ok, it seems like I usually get stuck on those minuscule problems. Turns out that Safari, unlike Chrome, doesn't like to play files without file extension. Adding ".mp4" to my files solved the problem...

Drupal with imce with S3 SLOW performance issue

I have configured my drupal site so that all images/files/media etc is handled my s3 by using S3 file system module.
Now everything works fine, the image/file/ field uploader works fine but there is a huge performance issue when using IMCE file browser from the WYSIWYG editor. It takes at least a minute for the browser to display its content and there are only 290 images with 78 MB used in that initial folder which should not cause such huge delays. This is having a huge impact for our editors and several minutes lost just to upload a couple of images.
I tried various pagination patch and there is no difference at all in the performance.
What are my options now
As drilled through many forms and discussions, turns out that IMCE was not meant for S3 file system and I found this patch in pdf form(warning downloads rather than opens )
I followed the steps in that patch which significantly improved my performance.

Why mp4 stored in S3 is not working in audio tag?

I have a rails app with an audio player that plays an audio file stored in S3. The player works locally, but not in production (Heroku). The linked audio file plays fine when pasted in the browser. I am not posting code because I don't know where the problem is (if it is a code problem) and besides it works locally.
Anyone give me a gut feeling about what is happening?
Your file on S3 was most likely uploaded with the incorrect content type header. You can verify this by looking at the response headers.
That's about all I can tell you without more information.

Uploading large Files 2gb + ColdFusion, Apache

We have upgraded to ColdFusion 10 and I am testing large upload capability.
Using both a HTML form and the flash multi-file upload CFFILEUPLOAD I can upload files of up to 2GB.
With files over 2gb the upload does not even start. 0% both with the flash upload and what chrome browser reports with HTML form.
Technical services suggest it does not even get as far as Apache, that is not restricting the upload. ColdFusion is also setup to allow 4000MB post data even with throttle.
The upload is occurring across the network, so even with test a 1.7gb file it doesn't take long - but 2.5gb does not even begin.
Any suggestions to help diagnose the cause?
Thanks

Rails, paperclip and s3, prompt download or view images?

So i got successfully working Paperclip and S3 uploading in RoR 3, but it turns out that some images are prompted to download and others can be viewed in the browser. What determines this behaviour?
Part of this could be browser-specific behavior based upon the MIME file type that the server is sending your browser. .png files are most often the culprit for forced download. See this SO question about the issues between IE uploads, old MIME types, etc.
If it is inconsistent on the type of picture, there is a way you can force a file to be downloaded, but no good way to force an image to be viewed in the browser.
Edit: I know that the forced download isn't rails specific, so here is the rails-specific version
Is one of the following helps you?
Paperclip Force Download
Rails 'link_to' to Download An Image Immediately Instead of Opening it in the Browser
Both of them says to send the file to the browser as attachment.