Hi! A lot of users seem to look for a way to get file info. Here’s a plugin for that
Plugin will: generate a Head Request to url and give back informations about a file.
Content-Type
Content-Length (in bytes)
Last-Modified
There’s one element that can be used to get file info or you can use action “Get file info”. Be aware that using element may lead to CORS issue. So better to use Action that will not have this issue.
I’m having trouble getting the results from a list of files of different formats like videos are not being parsed, tried with .mov, .3gp.
Images like jpeg, png are ok. CSV file is ok.
Thanks for your reply. Unfortunately, can not share the links to these files, but here’s the site where I got all sample file types to test the plugin - https://file-examples.com/ which you can use and test out the plugin.
Also by looking at the console.logs I see the CORS issues mentioned on the plugin page, though I wanted to ask if it’s possible to resolve the issue with the CORS as it may seem to impact the parsing for these file types.
Thanks.
Like the plugin said, a cors issue can happen if you are using element. Change to use the server side action to avoid this. file-examples.com is not a good… example! Because the link is not a direct link to the file.
The direct link for https://file-examples.com/wp-content/storage/2018/04/file_example_AVI_480_750kB.avi
is https://file-examples.com/storage/fe42d5335b663a39f9c45ee/2018/04/file_example_AVI_480_750kB.avi Did test and you get the content-length (742478).
Without the file url you are using, I cannot do more test. This is possible that the file storage service you are using doesn’t return content-length header. There’s nothing we can do about that and the issue is from the file storage provider. Returning content-length header is highly recommended but not mandatory.
The storage is Bubble’s internal File Storage. The sample files used for testing were downloaded from that resource and uploaded via File Uploader in Bubble app.
The CORS issue comes using the Bubble File Storage and not the external one.
As I wrote, it is related to specific types of files. Other files are fine.
If using the element is not an option, then indeed it’s sad to hear that nothing can be done.
I can confirm the issue with the element. But you can use the action to get this info.
CORS error are a security feature from browser. There’s not a lot we can do to avoid them. However, I will try to contact Bubble support about that because it’s sound strange that this error is returned only for specific file extensions.