Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
File upload not working for other file type
Avatar
Christophe Potvin
Member
Free Members
sp_UserOfflineSmall Offline
Apr 22, 2012 - 2:29 pm

Hello,

I'm using your plugin file upload.
I have no issue when uploading an image but when I choose "other file type" , the file is upload but doesn't appear in the topic

We can see a file is attached to the topic but there are no file in it
The file is also upload in wp-content/sp-resources/forum-file-uploads/admin/2012/04/
when I upload the file the link doesn't appear in the topic (like it's the case for image type)

you can test it on http://www.meilleurereponse.net/forum/

you can use the user

username : christophe183
password : christophe183

if you need more information thanks to let me know
Many thanks in advance for your support

Best regards

Christophe

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 22, 2012 - 2:52 pm

please see this topic: https://simple-press.com/suppo.....-problems/

for this known issue and a link to the fix until the next version is released...

Avatar
Christophe Potvin
Member
Free Members
sp_UserOfflineSmall Offline
Apr 22, 2012 - 3:35 pm

Hello,

In my case I also have the problem when logged as admin

In case I have put the permission "can upload files in post" for all kind of users to check

I can choose "other file type" the file is load in wp-content/sp-resources/forum-file-uploads but in the topics the HTML link to the file doesn't appear (like I have for image files) and so the attachment doesn't appear

 

Best regards

 

Christophe

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 22, 2012 - 5:10 pm

it didnt matter if it was admin or not...  the code was broken for other file uploads showing as attachments...  the fix is still what you want if needed before we push out an update (testing some other stuff)...

Avatar
Christophe Potvin
Member
Free Members
sp_UserOfflineSmall Offline
Apr 23, 2012 - 3:27 pm

Hello,

I have tried by copying the last "component" file without success

for you better understand my issue I have created on my forum 2 post

if you check here the last 2 post http://www.meilleurereponse.ne.....rum/excel/

You will see an there is an attached file for both of them

if you open "test with image first" (where I have upload an image and an excel file) the files are attached (but for the excel one there's a picture icon on the left of it too)

if you open "test without image" (I just upload an excel file) you won't see any attachment in the topic

Thanks for your checks and help

Christophe

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 23, 2012 - 4:06 pm

first, I think you need to wait for us to push out a new release of plupload...  just not sure when...  the next release is tied to 5.1 of SP unfortunately...

are you sure that you permissions allow downloading of other file attachments?  obviously me looking at the posts as guest dont help or tell me anything of your potential admin issue...  but with the latest development version of our file uploader, I cannot duplicate your issue...

actually, you shots do show a slight tweak I need to make, but it wont help your situation - probably make worse since I dont believe the excel file should be showing in the second one either...

Avatar
Christophe Potvin
Member
Free Members
sp_UserOfflineSmall Offline
Apr 23, 2012 - 5:15 pm

Hello,

 

Did you try with the user christophe183

I have given all kind of users the permissions to upload other files

I guess it must come from something special about my site or this issue would already have been raised many times

I hope we will find a solution as I find your forum really great but without this ablility for users to upload files it would be useless for my site

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 23, 2012 - 9:22 pm

no, sorry... forgot you sent me those...  probably tomorrow at this point...  but without the latest version, expecting problems...

Avatar
Christophe Potvin
Member
Free Members
sp_UserOfflineSmall Offline
Apr 24, 2012 - 4:57 pm

Hello,

 

Just to inform that I have found a fix to my problem by adding a line in the component file

line 549 : $show = true; to force it to show the file whatever kind it is

So I have

foreach ($spThisPost->attachments as $attachment) {
                $temp.= '<li>';
                if ($attachment['type'] == 'image') {
                        if (!$uploads['showinserted']) continue;
                        $icon = sp_find_icon(SPPLUPIMAGES, "sp_PlupImage.png");
                $show = true;
                } else if ($attachment['type'] == 'media') {
                        if (!$uploads['showinserted']) continue;
                        $icon = sp_find_icon(SPPLUPIMAGES, "sp_PlupMedia.png");
                $show = true;
                } else if (sp_get_auth('download_attachments')) {
                        $icon = sp_find_icon(SPPLUPIMAGES, "sp_PlupFile.png");
                $show = true; //added line
                }

Could you please let me know if it could bring something else to run bad or advice another codeline to show attachment of other type

 

Best regards

 

Christophe

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 24, 2012 - 10:15 pm

well, yes, that $show line should be there... it is in our current dev version... actually what you have there still is not right in the general case, but might work for you... really should be:

    foreach ($spThisPost->attachments as $attachment) {
        $found = false;
        $temp2 = '<li>';
        if ($attachment['type'] == 'image') {
            if (!$uploads['showinserted']) continue;
            $icon = sp_find_icon(SPPLUPIMAGES, "sp_PlupImage.png");
            $show = $found = true;
        } else if ($attachment['type'] == 'media') {
            if (!$uploads['showinserted']) continue;
            $icon = sp_find_icon(SPPLUPIMAGES, "sp_PlupMedia.png");
            $show = $found = true;
        } else if (sp_get_auth('download_attachments')) {
            $icon = sp_find_icon(SPPLUPIMAGES, "sp_PlupFile.png");
            $show = $found = true;
        }
        $temp2.= "<img src='$icon' alt='' />";
        $temp2.= "<a href='{$attachment['path']}{$attachment['file']}'>{$attachment['file']}</a> ";
        $temp2.= '<span>('.sp_plupload_format_size($attachment['size']).')</span>';
        $temp2.= '</li>';
        if ($found) $temp.= $temp2;
    }
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625