Uploading files over HTTP fails on iOS 8.0.0 GM Safari - ios

UPDATE:
Confirmed: This has been fixed on the iOS 8.0.2 update.
Using PUT/POST to upload file(s) over HTTP seems to get stuck on Sending Request Headers on mobile Safari on iOS 8 GM build.
I have an example here:
Open an HTTP monitor on your desktop and route your iOS 8 device
through it
Login
Add a file
Hit Upload
It gets stuck on Initializing (which is sending request headers)
This is the case even on http://m.facebook.com
- Try to add a photo to your status and it fails.
This only happens when the request contains a file. This is reproducible irrespective of having multiple enabled/disabled in the file input. Uploads work fine on Chrome on iOS 8.
Did anyone else experience this too? Is there a way to successfully send files over HTTP on iOS 8 Safari?

This was a bug in iOS 8.0.0 and was fixed in 8.0.2. The file body is not included in the request payload, but Content-Length is set as if it is.
See blog post File uploads appear to be broken in Safari on iOS 8.

Update: Apple released iOS 8.0.2 yesterday and has fixed the upload bug.
File upload are broken in iOS 8.0. All files uploaded in Mobile Safari return 0-sized [1].
Hopefully this gets fixed by Apple in the next release. It seems like it is not affecting home screen webapps though:
File uploads are broken!! Every file upload is not working, you can select a file or take a picture and after that JavaScript will not get any data, as well as the server on a POST upload through HTML or XMLHttpRequest upload. The problem doesn’t seem to apply for home screen webapps.
Source: http://www.mobilexweb.com/blog/safari-ios8-iphone6-web-developers-designers
[1] http://blog.fineuploader.com/2014/09/10/ios8-presents-serious-issues-that-prevent-file-uploading/

We're seeing similar issues in WordPress. All iOS8 GM uploads lead to 408 (http status, timeouts). Strangely enough, iOS8b5 was leading to error-500. Uploads are peachy under 7.1.*.
https://core.trac.wordpress.org/ticket/29602#comment:17

Actually the file upload works fine on IOS 8 (safari) if the image comes from screen shot and not from the iphone camera. For example, if you take a photo from you camera on iphone and try to upload the file via browser ( input type=file), it will send an empty data
src: "data:,"
while if you send the same image to your email and download it from your email and upload it again it works or if you take a screen shot photo it works as below
src: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8AAEQgGYATIAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkK....#
..."
Any idea or hint please us know.
Angluar JS is being used for file upload and NodeJS on the server
Regards,
Alan Mehio

Related

Microsoft Edge for iOS can’t Download Files

Downloading files by jspdf and exceljs doesn't work in Edge for iOS.
I implemented downloading by link.
At first name and size of file define and downloading is starting, but after appeare 'Can't download'.
Maybe I don't have anything in http response header. Look at it, please:
Response Headers
I tried downloading by adding Blob file to url using createObjectByUrl, but it's not supported by Edge for iOS.
Could you help me, please.
PS: Downloading works fine in Edge for Android and in Safari, Chrome for iOS, but doesn't work in Edge for iOS.
You can compress your file from backend and send the stream to frontend, download it as a zip file.
It works for me.

Universal link do not work on real devices

I'm currently working on implementing universals links into my App, they work perfectly on my simulators whether using command line xcrun simctl openurl booted or by tapping on links from messages
BUT I cannot run them on real devices (3 differents iPhones tested with 3 differents iOS 14.X versions)
App configuration > Signing and Capabilities > Associated Domains are correctly setup as applinks:<domain_name>.
I've already tried to :
uninstall/reinstall the App
clean my build repository
reboot my device
wait 5 minutes after installing the App
use another HTTP protocol for the route https://<domain>/.well-known/apple-app-site-association
tap the link from many apps (messages, discord, notes...)
expose my site with ngrok / localtunnel / apache server (in prod)
turn on/off "Associated Domains development" in Developer settings
I've verified on AASA validators sites like branch.io or appsflyer.com and everything is OK, once I reinstall the App to my iPhone, the aasa file is requested and it returns a 200 OK http response with the correct Content-Type : application/json
I ran out of idea to solve this issue. I really want to make it works before deploying the app on the Appstore even if it is working fine on simulators.
Thanks for your future help
Unfortunately, Universal links are not reliable for everyone, this seems to be an issue where the AASA files are not getting downloaded in the device.
Known Bug
There is a known universal bug for Apple where devices for iOS version 11.x+ , the AASA files do not get fetched and thus causing the Universal Links to fail.
Validate the issue
Normally, the Apple OS looks into retrying to fetch the AASA file at some time interval but the workaround might help for a test condition.
Inside the app, check if the AASA files were downloaded successfully or not. To do this:
Copy the link into your notes app.
Long-press the link till a dropdown appears. If the dropdown shows 'Open link', then Universal Links are not working for that device. If the link shows 'Open in app name', the configuration is working fine.
Backup plan
Also you can implement a fall back deeplink call on your sercerside with the help of user-agent and other stuff
In your apple-app-site-association file check if you are using "appID":".bundleid". If so, try replacing it with "appID":".bundleid" or vice-versa.

Wordpress website not displaying images on certain safari browsers

I have a weird situation, I am developing a site I can see all of the images well on my mac as well as an android phone but on my iPhone and my friends mac, and iPad it is not displaying the images when using safari. Is there something I need to add to the files for this to display properly all through out?
Thanks all feedback welcomes
It appears these assets are linked using https but there is not a valid SSL on the site. So on the devices where it works you have either authorized the SSL or bypassed it, but the other devices have not.
If you open up the Developer Tools in Chrome and view the console you can see the assets with issues along with the error message... "Failed to load resource: net::ERR_INSECURE_RESPONSE"
Just in case someone else has the same problem. For me the problem was that a plugin "Ewww image optimizer" converted images to webP, these were then cached and served by cloudflare and wouldn't load in safari

Cannot upload iOS simulator build for Facebook App review

I literally cannot upload iOS simulator build for Facebook App review.
I have an iOS universal (iPhone/iPad) video game that I need to submit to Facebook review in order to get approval for "publish_actions" permission.
I've successfully built the iOS simulator build, compressed it to a ZIP archive and then it simply doesn't get uploaded to the corresponding Facebook web site form.
What I've already tried:
I've tried to upload different versions of my app - one is 216MB
compressed, the other is 360MB. Could it be the size of the archive
that is too big?
I've tried to use different archive programs to make the ZIP
archive.
I've tried to upload it from different browsers (Safari, Chrome)
and platforms (Mac OS X, Windows 7).
No success at all.
I do the following steps:
Click the "provide a version" link
Click the "Use an Uploaded Simulator Build" button
Click the "Choose a File" button
Select the ZIP archive with the app
Then I see a spinning progress bar
And then - nothing happens.
UPDATE:
I've additionally tried the following things as advised:
Created a new empty application. Did a simulator build. And successfully uploaded it. Size of the archive was 23KB
Enabled network state logging in dev tools of Chrome, Safari, Firefox and indeed there's no sign of data transfer when uploading my application archive
UPDATE 2:
I've filed a bug to facebook
They know about this issue.
Most internet connections have much crappier upload speed than download speed. Uploading 200MB would really take a long while. How much did you wait?
Try making an empty new project and uploading a build of it to see if it goes up.
Try checking your network activity while you're waiting to see if you're really uploading anything.
File a bug # developers.facebook.com . Facebook support will help you figure out the issue much faster.
https://developers.facebook.com/bugs/

iOS Mobile Safari File Upload renames file

I have a web app designed for use on an iOS device. The web app includes file uploaders, which are meant to allow the user to upload an image from their iOS device or take an image from their camera.
The issue I'm running into is that I want the user to be able to upload PNG images through this interface, as well.
What is happening, though, is that it seems iOS renames the file image.jpg before it is sent to the web app, not honoring the original file extension. This is only an issue because I am trying to preserve transparency in the .png files, and this is lost in the extension renaming.
Any thoughts on how to handle this? Thanks, in advance, for any assistance on this front.
Mobile Safari only allows the uploads of jpeg's at this time. If you try to upload a png it will be (heavily) compressed into the jpeg format and then uploaded to the server.
The only way we have been about to get around this is by creating a native app for iOS and uploading the image through the Cocoa-Touch API's.
I've filed a Bug report with apple for this issue. Bug ID: 14494395

Resources