✨ Improved file uploader; uploads from the library can be selected
This commit is contained in:
@@ -4,26 +4,11 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export interface ImageData {
|
||||
id: string;
|
||||
uploaded_at: string;
|
||||
mime_type: string;
|
||||
hash?: string;
|
||||
size?: number;
|
||||
deleted_at?: string;
|
||||
alt_text?: string;
|
||||
filename?: string;
|
||||
thumbhash?: string;
|
||||
server?: string;
|
||||
imported: boolean;
|
||||
quizzes: { id: string }[];
|
||||
quiztivities: { id: string }[];
|
||||
}
|
||||
import type { PrivateImageData } from '$lib/quiz_types';
|
||||
|
||||
export const load = (async ({ fetch }) => {
|
||||
const res = await fetch('/api/v1/storage/list');
|
||||
const json: ImageData[] = await res.json();
|
||||
const json: PrivateImageData[] = await res.json();
|
||||
return {
|
||||
images: json
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user