attachment icon not being displayed
using 2.0.18.10 with Bootstrap theme
I noticed that when attaching a file (.zip), the attachment is not being displayed under the textarea. When posting the topic, it is being displayed. So the problem is not that it is not being uploaded but it is not visible under the textarea when you choose the file before posting (under the browse button actually). Only images are visible under the textarea when you attach them.
And there is a difference between the browsers: if choosen a .zip file, see images below
I use FileUploadDetect
What can be the problem because when i attach a .zip file on this forum, it is being displayed under the textarea
![](
it is a little bit misleading because the user can not see if the file is being attached or not, especially on FF
This problem appears on both plugins; FileUpload and FileUploadDetect; i have tested them both
After posting: it is displayed perfectly!
Comments
i looked into the console of FF on the place the icon(image) should appear, and it says: "Failed to load given url"
This is the url i can see in the console:
When i type the url in the browser, he gives me a 404
But this is really the place where the .png file is
Have you tried using rewrite url ?
try changing that in the htaccess file too. I noticed this in your forum in the past and mentioned it. This problem may well be due to that.
<img src="/index.php?p=/plugins/FileUpload/images/oxygen-style/application-zip.png" alt="image">
there should not be access to the file upload folder other than to get the image
try this and tell me if it gets the image
<img src="/plugins/FileUpload/images/oxygen-style/application-zip.png" alt="image">
Try changing that in the web inspector and see if the image shows.
Or go to the image in the file manager and click it to view the image and see what url it gives you.
the link should be like this for the thumbnails
<img src="/forum/uploads/thumbnails/FileUpload/31/dbafefb1215babeaed83b548501c6a.png" class="ImageThumbnail" alt="UserImage">
and for the uploads
<img src="/forum/uploads/FileUpload/31/dbafefb1215babeaed83b548501c6a.png class="Image" alt="UserImage">
this is what it looks like using clean urls
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
i put these lines in my .htaccess file but it doesn't change anything; still in the console: "Failed to load given url"
no please follow here,
if your forum is in the root this is what the htaccess need to look like
Then set this in your config.php
$Configuration['Garden']['RewriteUrls']=TRUE;
Depending on where your forum is installed you change / to /forum or whatever the name .
example:
RewriteBase /forum
or
RewriteBase /thisismyforumname
or
just
/
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
My forum is in the root, so i put these lines above into my .htaccess and i added the $configuration line into the config.php
But still the same problem
Edit:
In the console it says still:
Nothing changed
Did you empty the cache ini files files ?
Do you have a thumbnails folder ?
Do you have an uploads folder ?
Is the image in the folder ?
What is the full url to the image. Not the fileupload detect image. Remember that fileupload detect simply adds an icon of the file type.
If you are using fileupload detect then that is where you need to search for the problem.
please try this only using the normal fileupload plugin. disable the fileupload detect.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Yes, i emptied the browsers cache, the browsers history, and the .ini files in the cache folder but still no result; the url doesn't change in the console
That image up there is an image from the file upload detect plugin I think that is where you need to fix the urls to get the image.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thanks. You pushed me in the right direction @vrijvlinder.
I made absolute url in the following lines and now it shows the image:
Great !!
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I have this exact same problem but I'm not using FileUpload Detect, but rather the regular FileUpload plugin v 1.7.1
Does anyone know if this fix can be adapted to the the regular FileUpload plugin?
His problem was that the filetype image icons from file upload detect did not show . Not the thumbnails for atachments, is that what your problem is ?
or is it that thumbnails don't show ?
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@meshugy
if the problem is the file type icon in fileupload plugin
check this around line 579 of the class.fileupload.plugin.php
$Url = Asset('/plugins/FileUpload/images/file.png');
I made my own file for this :
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder the problem @jackmaessen had was identical to mine. When you upload an attachment, the preview thumbnail does not appear. I had the same results as displayed in the images he posted above. No preview thumbnail in Firefox and an "X" in IE. I think the solution is the same (i.e. fixing the link to the thumbnail folder), but I don't know where to enter the hardlink to the preview thumbnails in the FileUpload.
No, jack's problem was the icon file type image that shows what kind of file it is.
The link to the thumbnail folder is this
/forum/uploads/thumbnails/FileUpload/31/dbafefb1215babeaed83b548501c6a.png
There is nothing to change because it uses Path to file. Path to file is the the uploads folder.
The problem might be with htaccess . It might need the full path to the image or change the structure of the url somehow .
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
You can also see this in the media model
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder thanks, but I'm still not sure how to fix this. Seems that others have had this same issue: http://vanillaforums.org/discussion/comment/200969/#Comment_200969
@meshugy
first you should check to see if you have a thumbnail folder in the uploads folder.
As you can see from he link I posted the thumbnail folder needs to be inside the uploads folder not the fileupload folder in the uploads.
the thumbnail folder can have a chmod of 666 . I don't think it needs to have higher..
please give me a link to where I can observe this ? I will try to help get to the bottom is I can...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder I think I have a thumbnail folder. Every image that gets uploaded goes here: www.djangobooks.com/forum/uploads/FileUpload/
there are loads of numbered folders in there and each seems to contain the uploaded image and a thumbnail