mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore!: remove deviceId and deviceAssetId (#27818)
chore: remove deviceId and deviceAssetId
This commit is contained in:
@@ -110,7 +110,7 @@ export const fileUploadHandler = async ({
|
||||
const deviceAssetId = getDeviceAssetId(file);
|
||||
uploadAssetsStore.addItem({ id: deviceAssetId, file, albumId });
|
||||
promises.push(
|
||||
uploadExecutionQueue.addTask(() => fileUploader({ assetFile: file, deviceAssetId, albumId, isLockedAssets })),
|
||||
uploadExecutionQueue.addTask(() => fileUploader({ deviceAssetId, assetFile: file, albumId, isLockedAssets })),
|
||||
);
|
||||
} else {
|
||||
toastManager.warning(get(t)('unsupported_file_type', { values: { file: file.name, type: file.type } }), {
|
||||
@@ -132,6 +132,7 @@ type FileUploaderParams = {
|
||||
albumId?: string;
|
||||
replaceAssetId?: string;
|
||||
isLockedAssets?: boolean;
|
||||
// TODO rework the asset uploader and remove this
|
||||
deviceAssetId: string;
|
||||
};
|
||||
|
||||
@@ -151,8 +152,6 @@ async function fileUploader({
|
||||
try {
|
||||
const formData = new FormData();
|
||||
for (const [key, value] of Object.entries({
|
||||
deviceAssetId,
|
||||
deviceId: 'WEB',
|
||||
fileCreatedAt,
|
||||
fileModifiedAt: new Date(assetFile.lastModified).toISOString(),
|
||||
isFavorite: 'false',
|
||||
|
||||
@@ -7,9 +7,7 @@ import { Sync } from 'factory.ts';
|
||||
export const assetFactory = Sync.makeFactory<AssetResponseDto>({
|
||||
id: Sync.each(() => faker.string.uuid()),
|
||||
createdAt: Sync.each(() => faker.date.past().toISOString()),
|
||||
deviceAssetId: Sync.each(() => faker.string.uuid()),
|
||||
ownerId: Sync.each(() => faker.string.uuid()),
|
||||
deviceId: '',
|
||||
libraryId: Sync.each(() => faker.string.uuid()),
|
||||
type: Sync.each(() => faker.helpers.enumValue(AssetTypeEnum)),
|
||||
originalPath: Sync.each(() => faker.system.filePath()),
|
||||
|
||||
Reference in New Issue
Block a user