Announcement

#1 2016-01-16 00:20:42

neige
Member
2016-01-16
1

Allow any file type?

Hello/Hi/Greetings,

is there a way to allow the upload of any file type? thank you

Piwigo version: 2.7.4
PHP version: 5.6

Last edited by neige (2016-01-16 00:21:04)

Offline

 

#2 2016-01-20 18:06:25

webmom
Member
2016-01-20
6

Re: Allow any file type?

I'm trying to do that now. See http://piwigo.org/ext/index.php?cid=12 for a plugin. Warning: I don't think it works if you installed Embedded Videos or Jplayer plugins. There are related forum posts on this plugin. Read them before installing to save yourself some trouble.

Offline

 

#3 2016-01-20 18:59:24

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13182

Re: Allow any file type?

In plugin LocalFiles Editor, tab "local configuration", add:

Code:

<?php
$conf['file_ext'] = array_merge(
  $conf['picture_ext'],
  array('pdf', 'tiff', 'tif')
  );

$conf['upload_form_all_types'] = true;
?>

And you will be able to upload pdf/tiff/tif files :-)


Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 

#4 2016-01-20 20:26:51

webmom
Member
2016-01-20
6

Re: Allow any file type?

That doesn't work for audio and video files because they need a player. So that doesn't work for ANY file type. I'm still trying to get Charlie's Content plugin to work for mp3s. I already have Embedded Videos installed and already uploaded 28 videos that way. If I deactivate Embedded Videos, the videos would have to be reuploaded using Charlie's Content plugin.

Note: The original poster didn't say which files he or she is uploading.

I am trying to upload photos (that works), PDFs (eventually), videos (used embedded YouTube links) and mp3s (not currently working). I was going to start my own thread but I thought this was the same question. Sorry if I'm wrong.

or will this work?

[php]<?php
$conf['file_ext'] =  array('jpg','JPG','png','PNG','gif','GIF','mpg','zip','avi','mp3','ogg')
?>[/php]

It caused a thumbnail error in Twitter Cards. Not sure if I can deactivate that for that album only. Facebook posts appear on Twitter anyway so it is no big deal to deactivate it.

I when to Admin > Tools > Syncronize and checked directories and files. I still see a music icon and the link doesn't work.

Last edited by webmom (2016-01-20 21:00:23)

Offline

 

#5 2016-01-20 21:31:23

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13182

Re: Allow any file type?

You can upload "any" file type. If Piwigo doesn't know how to display them, you get a generic icon (like your mp3). If there is no specific player, you can just "download it". But you can't say it "doesn't work". Because the file is considered as element like a photo, with properties (title, tags, description, author), belongs to albums, is searchable, etc.


Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 

#6 2016-01-20 21:46:46

webmom
Member
2016-01-20
6

Re: Allow any file type?

I don't see the mp3 icon because I uploaded the thumbnail image.

Add Photos > Update > representative picture

I wanted someone to be able to click to access the mp3 that is associated with the image.

I tried Charlie's Content to get the mp3 to play but it didn't work.

We're trying to offer a free download for one of the songs. I wanted it in piwigo so people would login to download it.

If I add a comment and use the website link, my name becomes the link. And if I post a comment, text goes there but no HTML. That is how it was designed.

So I can upload any file but I can't access it through the photo gallery. I see the path and could create a link but I'm unsure how to do it. Maybe I should try the jplayer again. The demo worked but it didn't play my song. The file size is too big even after compression.

Last edited by webmom (2016-01-20 22:26:19)

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact