Skip to content

Commit

Permalink
Added mime type to media linking (#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsorohova authored Jan 31, 2024
1 parent 0e1a8ea commit 3ef57c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/admin/media/mediaModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ViewManager } from '@paperbits/common/ui';
import { IMediaService } from '@paperbits/common/media';
import { MediaContract } from '@paperbits/common/media/mediaContract';
import { Query, Operator } from '@paperbits/common/persistence';
import { MimeTypes } from '@paperbits/common';
import { Checkbox, DefaultButton, IconButton, IIconProps, Image, ImageFit, IOverflowSetItemProps, Link, Modal, OverflowSet, SearchBox, Spinner, Stack, Text, TextField } from '@fluentui/react';
import { DeleteConfirmationOverlay } from '../utils/components/deleteConfirmationOverlay';
import { getAllValues, getThumbnailUrl } from '../utils/helpers';
Expand Down Expand Up @@ -99,7 +100,7 @@ export class MediaModal extends React.Component<MediaModalProps, MediaModalState
}

linkMedia = async (): Promise<void> => {
const newMediaFile = await this.mediaService.createMediaUrl('media.svg', 'https://cdn.paperbits.io/images/logo.svg');
const newMediaFile = await this.mediaService.createMediaUrl('media.svg', 'https://cdn.paperbits.io/images/logo.svg', MimeTypes.imageSvg);
this.setState({ selectedMediaFile: newMediaFile, showNonImageDetailsModal: true, isLinking: true });
}

Expand Down

0 comments on commit 3ef57c1

Please sign in to comment.