Rogelio's picture

Hi, in the App content type i created a file field for .apk uploading in public mode for the latest release of the app, the file upload correct but no one can see it, i put every apk field permissions free for all , then i created a custom block with the same download link (.com/file/389/download) that users can see this link but when click it sends to Access Denied page, only admin can see it and download it

Must to say that... if i put a direct link to the file (web.com/files/apk_files/myapp.apk) then everyone can download.

is there any other settings am missing to let users see the file?

thanks for help

Accepted answer

This is probably because your files are classified as octet-stream, since the mimetype for APK files is unknown to Backdrop. When this happens, Backdrop doesn't assign a file type to the managed file. This can be confirmed by going to admin/content/files and checking the Type column for those files.

You can force Backdrop to classify those files as Documents by going to /admin/structure/file-types/manage/document/configure and adding application/octet-stream at the bottom of the list of the Media types textarea.

Then you'll need to reclassify existing files by going to admin/structure/file-types/classify.

You can check a similar issue here: https://github.com/backdrop/backdrop-issues/issues/6674

Comments

This is probably because your files are classified as octet-stream, since the mimetype for APK files is unknown to Backdrop. When this happens, Backdrop doesn't assign a file type to the managed file. This can be confirmed by going to admin/content/files and checking the Type column for those files.

You can force Backdrop to classify those files as Documents by going to /admin/structure/file-types/manage/document/configure and adding application/octet-stream at the bottom of the list of the Media types textarea.

Then you'll need to reclassify existing files by going to admin/structure/file-types/classify.

You can check a similar issue here: https://github.com/backdrop/backdrop-issues/issues/6674

Rogelio's picture

Thank you argiepiano, it works exactly as you said, the only thing is i dont have the "classify option" under file-types but I wrote it and I was able to access it and its done, now users can download the file.

thanks