Best hosting option for audio library website


Since you posted the question in the VPS Hosting forum, I am assuming that you are looking for a VPS. Honestly, you would be better off with a dedicated server.

Do keep in mind that nothing is “unlimited” – you are looking for shared highly ontended bandwidth if you want to use a lot of inexpensive traffic.

WordPress media library attachment-filter: Different set of mime types are appearing in List and Grid view modes

I have an array of mime_types like the following:

$mime_map = array(
    /** Data types */
    array(
        'name' => 'Comma separated (csv)',
        'mime' => 'text/csv',
        'ext'  => 'csv',
    ),
    array(
        'name' => 'Spreadsheet',
        'mime' => 'application/excel',
        'ext'  => 'xl',
    ),
    array(
        'name' => 'Microsoft Excel',
        'mime' => 'application/vnd.ms-excel',
        'ext'  => 'xlsx',
    ),
    array(
        'name' => 'Microsoft Excel (xls)',
        'mime' => 'application/x-xls',
        'ext'  => 'xls',
    ),
    array(
        'name' => 'Spreadsheet (odf)',
        'mime' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
        'ext'  => 'odf',
    ),
    
    /** Image types */
    array(
        'name' => 'Image (gif)',
        'mime' => 'image/gif',
        'ext'  => 'gif',
    ),
    array(
        'name' => 'Image (png)',
        'mime' => 'image/png',
        'ext'  => 'png',
    ),
    array(
        'name' => 'Image (jpg)',
        'mime' => 'image/jpeg',
        'ext'  => 'jpg',
    ),
    array(
        'name' => 'Image (jpeg)',
        'mime' => 'image/pjpeg',
        'ext'  => 'jpeg',
    ),
    array(
        'name' => 'Image (svg)',
        'mime' => 'image/svg+xml',
        'ext'  => 'svg',
    ),
    array(
        'name' => 'Image (WebP)',
        'mime' => 'image/webp',
        'ext'  => 'webp',
    ),
    
    /** Video types */
    array(
        'name' => 'Video (3gp)',
        'mime' => 'video/3gp',
        'ext'  => '3gp',
    ),
    array(
        'name' => 'Video (3gpp)',
        'mime' => 'video/3gpp',
        'ext'  => '3gpp',
    ),
    array(
        'name' => 'Video (avi)',
        'mime' => 'video/avi',
        'ext'  => 'avi',
    ),
    array(
        'name' => 'Video (mp4)',
        'mime' => 'video/mp4',
        'ext'  => 'mp4v',
    ),
    
    /** Audio types */
    array(
        'name' => 'Audio (mp4)',
        'mime' => 'audio/mp4',
        'ext'  => 'mp4',
    ),
    array(
        'name' => 'Audio (mpeg)',
        'mime' => 'audio/mpeg',
        'ext'  => 'm4a',
    ),
    array(
        'name' => 'Audio (mp3)',
        'mime' => 'audio/mp3',
        'ext'  => 'mp3',
    ),
    
    /** Document types */
    array(
        'name' => 'Photoshop Document',
        'mime' => 'application/octet-stream',
        'ext'  => 'psd',
    ),
    array(
        'name' => 'PDF Document',
        'mime' => 'application/pdf',
        'ext'  => 'pdf',
    ),
    array(
        'name' => 'Office Word',
        'mime' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
        'ext'  => 'docx',
    ),
    array(
        'name' => 'MS Word Document',
        'mime' => 'application/msword',
        'ext'  => 'doc',
    ),
    array(
        'name' => 'MS PowerPoint',
        'mime' => 'application/vnd.ms-powerpoint',
        'ext'  => 'ppt',
    ),
    array(
        'name' => 'Office PowerPoint',
        'mime' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
        'ext'  => 'pptx',
    ),
    array(
        'name' => 'Document (odt)',
        'mime' => 'application/vnd.oasis.opendocument.text',
        'ext'  => 'odt',
    ),
    
    /** Text types */
    array(
        'name' => 'Text (Plain)',
        'mime' => 'text/plain',
        'ext'  => 'txt',
    ),
    array(
        'name' => 'Text (RTF)',
        'mime' => 'text/rtf',
        'ext'  => 'rtf',
    ),
    
    /** Archive types */
    array(
        'name' => 'Archive (gzip)',
        'mime' => 'application/x-gzip',
        'ext'  => 'gz',
    ),
    array(
        'name' => 'Archive (7zip)',
        'mime' => 'application/x-7z-compressed',
        'ext'  => '7zip',
    ),
    array(
        'name' => 'Archive (zip)',
        'mime' => 'application/zip',
        'ext'  => 'zip',
    ),
    array(
        'name' => 'Archive (rar)',
        'mime' => 'application/rar',
        'ext'  => 'rar',
    ),
    array(
        'name' => 'Archive (tar)',
        'mime' => 'application/x-tar',
        'ext'  => 'tar',
    ),
);

I am using the above array to populate attachment-filter dropdown with specific file types for better filtration. The filter works well in both list and grid view modes but the list of mime-types that appear in the said modes are different!

In list view, correct mime-types are appearing, i.e. only those which have at least one media was uploaded to. But in grid view, all available mime-types in the above array are appearing.

add_filter( 'post_mime_types', array( $this, 'wpmf_custom_mime_types' ), 10, 1 );
function wpmf_custom_mime_types( $post_mime_types ) {
    $media_mime_types       = new Media_Filter_Mime_Types();
    $types                  = $media_mime_types->media_types;
    
    foreach( $types as $key => $mime ) {
        $post_mime_types($mime('mime')) = array( __( $mime('name'), 'text-domain' ) );
    }
    
    return $post_mime_types;
}

Screenshot (List view mode)
enter image description here

Screenshot (Grid view mode: more items are appearing)
enter image description here

Update #1
I added the following in the array

...
array(
    'name' => 'How about this',
    'mime' => 'text/hath',
    'ext'  => 'hat',
),
...

I tried to upload a file (how-about-this.hat), which as expected, failed to upload and this mime-type is not visible in the filter for list view either. But it does appear in grid view mode.

Update #2
I emptied the function body to look like this:

function wpmf_custom_mime_types( $post_mime_types ) {
    // Nothing here
}

And, as expected, the attachment-filter in both view modes become synchronized. But whenever I am putting the code back in the function body, the said problem starts to appear.

Is there anything I am missing or something specific is required to be done to synchronize the items because I am adding them through code?

sharepoint online – How to fetch only Site Pages and not page templates from Site Pages library using REST call?

I am trying to fetch only the site pages and not the page templates using REST call, but using below RESt endpoint I am getting all the site pages including page tempates. How to filter out only the site pages from site pages library so it does include page templates present in site pages library.

/_api/web/lists/getByTitle('Site Pages')/items?$select= Title,ID&$filter=Title ne null

How to create Asset Library (BaseTemplate = 851) in Sharepoint Online?

Been searching through the internet for a couple of days to no avail but how do you create Asset Library with BaseTemplate = 851 in modern sites for Sharepoint Online via the REST API V1.0 endpoint? I am able to create Lists, Document libraries & Picture libraries with no issues but when I use BaseTemplateId = 851 the REST endpoint is not accepting the payload.

data = JSON.stringify({
        "__metadata": {"type": "SP.List"},
        "AllowContentTypes": true,
        "BaseTemplate": 851,  
        "ContentTypesEnabled": true,
        "Description": "My list description",
        "Title": foldername
      
    })

headers.append("Authorization", bearer)
headers.append("Content-Type", "application/json;odata=verbose")
headers.append("Accept", "application/json;odata=verbose")
headers.append("X-RequestDigest", formDigestValue)
const options = {
    method: "POST",
    headers: headers,
    body: data
};

return fetch(folderPath + '/_api/web/lists', options)
    .then(response => response.json())
    .then(response => console.log(response))

BaseTemplate – 100, 101 & 109 are just working fine and I am able to create lists and document libraries. 851 is not working programmatically though I can create Assets Library manually ( I have activated Video and Rich Media Site Collection Features).

Any help here would be much appreciated! Thank you

Upload local folder structure (size upto 25GB) to SharePoint 2013 on premise document library

I want to migrate local folder which has upto 25GB of data (including documents and media files). Is there any free tool/script which I can use to upload data into SharePoint document library?

Manage permissions on library subfolder SharePoint 365

I’m using SharePoint form Microsoft 365

I have created site and added some members. I created a library on it, but I would like that only some persons have access to certain subfolders inside (not all site members). I have read about breaking inheritance, and granting excusive permissions on folders, but, as far as I can see, on 365 I can only do it at library level, not subfolder or item level.

Is there a way to perform this on 365, or using different libraries is the better (or even unique) approach to perform this?

Will moving a PDF and Word Document library to a CMS negatively effect SEO on site redesign?

I’m redesigning a website built on an outdated platform, going from Asp.Net Web Forms to Gatsbyjs. The site has a PDF and Word Document library that is stored locally on the web host, so a link to a pdf would be something like:

https://www.sitedomain.com/resources/filename.pdf

It would be much easier, and more dynamic for my client, to store the PDF’s and documents on the Contentful cms. However, I’m concerned whether Google will look negatively on these resources no longer being located on the domain itself.

Any info on this would be appreciated.

javascript – Update displayed File URL in Media Library modal when it’s changed

I’ve added a Select custom field for all Attachments using Advanced Custom Fields plugin.

When user selects something in that field, the attachment file is moved to a sub-folder, so the path changes from wp-content/uploads/file.jpg to wp-content/uploads/protected/file.jpg. Is there a way to reflect that change immediately in the File URL, without reloading the page?

I noticed there’s an AJAX called being made when the changes are saved. It returns a JSON with the new URL but I couldn’t figure out a way to hook to that data.

enter image description here

What type of database is best for a music library management model?

I am building an application for a client-server library management system where the server performs any library management functions such as adding a new album to the library, and the client is just an interface to the backend library.

I am trying to determine what type of database is best for my use case of modeling a music library. Initially, I was leaning towards a SQL database, such as postgresql, since my data has clearly defined relationships (tracks to albums, artists, etc.), but I am not sure how to best handle the design requirement of modeling custom or arbitrary data for tracks. For example, some people like to store a ‘mood’ for each of their tracks, optional plugins may store a specific identifier such as ‘musicbrainz_id’. It’s impossible to know ahead of time the full list of possible fields.

I’ve considered the options of custom fields in a SQL database, such as an EAV model, or using json, but if there are a lot of these types of custom/plugin-added fields, I wonder if using a document-oriented NoSQL database, such as MongoDB, is better suited.

The load on the server is most likely going to be read/query heavy, so I’d like my database to be optimal for such operations. I am not expecting a lot of concurrent requests on a single music library, but I think the possibility of concurrency rules out a database like sqlite.

Edit: If you downvote, please comment what I could do to improve my post, or if there is somewhere else my question would be better suited for.

sharepoint online – Can’t create alerts for document Library for which users can only read their own documents

It’s the default behavior that user cannot create alert when we set read access on their own items.

As a workaround, you can create a custom workflow to use “send email” action and start workflow automatically when the item changed in SharePoint Designer.

Here is a similar post for your reference.