What were you doing: Adding a pdf document to a note
What feature did you use: Drag and drop
What happened: The document is not synced and an error is shown
What did you expect to happen: The document shall be uploaded
Feedback: I see many CORS related errors in console. The error only happens with attachments (i also tried png, and jpeg), but text modifications to the note syncs fine.
/#/notes/note/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:1 Access to fetch at 'https://cws.icloud-content.com/REDACTED/singleFileUpload?tk=REDACTED&ref=REDACTED&c=iCloud.net.shinyfrog.bear&z=Notes&uuid=REDACTED&dataclass=com.apple.Dataclass.CloudKit&p=120&e=REDACTED' from origin 'https://web.bear.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Hi, thanks for the feedback. Yes, we noticed this last night and are actively working on it. It looks like something changed in the way Apple manages CORS permissions, resulting in failed uploads from Bear Web. I’m testing now a workaround, we’ll keep you posted.
I’m building a web app that syncs with CloudKit via CloudKit JS (2.6.4), and I’m running into exactly the issue from this thread: reading records and downloading assets works, but saving a record with an asset fails because the preflight to https://cws.icloud-content.com//singleFileUpload?tk=… comes back without an Access-Control-Allow-Origin header. As far as I can tell, the upload host only allows https://www.icloud.com as an origin now, regardless of the origins registered on the API token.
You mentioned you shipped a fix the same day. Would you be willing to share roughly what you changed?