.js
This commit is contained in:
parent
0eb25b5ab4
commit
3046b87b76
1 changed files with 3 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
||||||
import { uploadFromUrl } from '@/services/drive/upload-from-url.js';
|
import { uploadFromUrl } from '@/services/drive/upload-from-url.js';
|
||||||
|
import define from '../../../define.js';
|
||||||
import { DriveFiles } from '@/models/index.js';
|
import { DriveFiles } from '@/models/index.js';
|
||||||
import { publishMainStream } from '@/services/stream.js';
|
import { publishMainStream } from '@/services/stream.js';
|
||||||
import { HOUR } from '@/const.js';
|
import { HOUR } from '@/const.js';
|
||||||
import define from '@/server/api/define';
|
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['drive'],
|
tags: ['drive'],
|
||||||
|
@ -33,8 +33,8 @@ export const paramDef = {
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, paramDef, async (ps, user, _1, _2, _3, ip, headers) => {
|
export default define(meta, paramDef, async (ps, user) => {
|
||||||
uploadFromUrl({ url: ps.url, user, folderId: ps.folderId, sensitive: ps.isSensitive, force: ps.force, comment: ps.comment, requestIp: ip, requestHeaders: headers }).then(file => {
|
uploadFromUrl({ url: ps.url, user, folderId: ps.folderId, sensitive: ps.isSensitive, force: ps.force, comment: ps.comment }).then(file => {
|
||||||
DriveFiles.pack(file, { self: true }).then(packedFile => {
|
DriveFiles.pack(file, { self: true }).then(packedFile => {
|
||||||
publishMainStream(user.id, 'urlUploadFinished', {
|
publishMainStream(user.id, 'urlUploadFinished', {
|
||||||
marker: ps.marker,
|
marker: ps.marker,
|
||||||
|
|
Loading…
Reference in a new issue