I am using Filestack in my app to facilitate file uploads.
There is a problem on Apple devices when user try to upload from the Files app.
Files appear greyed out and un-selectable.
I have raised this issue with Filestack who have acknowledged the reproducible bug and have said they will get to it. However that was months ago. I have chased several times.
Clearly, Apple users make up a significant portion of the market and this bug is leading me to lose customers. I am wondering if the Stackoverflow community is aware of this and/or is aware of a workaround?
Here is my code for the Filestack web picker:
<script src="//static.filestackapi.com/filestack-js/3.x.x/filestack.min.js"></script>
<script>
// Set up the picker
const clientOptions = {
security: {
policy: "{{$uploadpolicy}}",
signature: "{{$uploadsignature}}"
}
}
const client = filestack.init("{{env('FILESTACK_KEY')}}", clientOptions);
const options = {
storeTo: {
location: 's3',
path: '{mypath}'
},
uploadConfig: {
tags: {
"app": "{myapp}"
}
},
onUploadDone: updateForm,
maxSize: {{env('PRO_FILESIZE_LIMIT')}} * 1024 * 1024,
maxFiles: {{env('PRO_TRACK_LIMIT')}},
accept: 'audio/*',
uploadInBackground: true,
transformations: {},
onFileSelected(file) {
if (file.size > {{env('PRO_FILESIZE_LIMIT')}} * 1024 * 1024) {
throw new Error('File too big, select something smaller than 240MB');
}
}
};
const picker = client.picker(options);
const form = document.getElementById('pick-form');
const fileInput = document.getElementById('fileupload');
const btn = document.getElementById('picker');
const nameBox = document.getElementById('nameBox');
const urlBox = document.getElementById('urlBox');
btn.addEventListener('click', function (e) {
e.preventDefault();
picker.open();
});
var page = window.location.pathname;
function updateForm(result) {
var data = result.filesUploaded;
console.log(data);
$.post({
type: 'POST',
url: '/uploadtrack/{{$artist_token}}',
data: {uploads: result.filesUploaded},
// dataType: 'JSON',
success: function (response) {
// do stuff
});
}
</script>
This all works great on any desktop. On iPhone devices when browsing for files, valid file types are greyed out and un-selectable. I would expect them to be selectable.