Back

[CLOSED] relationship one to many limit, filter.

  • 0
  • Web
Camo
21 May, 2023, 17:31

Is there a way to limit the amount of relationship items being returned and filter them by created time, to lets say return only 7 days of worth of items?

TL;DR
The user is inquiring about a problem with image uploads. Uploading a JPG/PNG and requesting the transformed version returns a WebP image correctly. However, uploading a WebP and requesting the transformed version does not return the proper image. The user includes code snippets for reference. There is no solution provided for this specific issue. Additionally, the user asks if there is a way to limit the number of relationship items being returned and filter them by created time. No solution is provided for this question either.
Camo
21 May, 2023, 17:31

relationship one to many limit, filter.

Drake
21 May, 2023, 20:21

You can't limit them at the moment

Camo
24 May, 2023, 14:03

@Steven i've noticed interesting thing, if i upload an jpg/png, and request the transformed version, i get a webp just fine, but if i upload webp and request transformed version, i don't get a proper image back. html <FileDropzone name="files" bind:files on:change={onChangeHandler}> <svelte:fragment slot="lead"><i class="fa-solid fa-file-arrow-up text-4xl"></i></svelte:fragment> <svelte:fragment slot="message">Drag & Drop your image here</svelte:fragment> <svelte:fragment slot="meta">{image_name}</svelte:fragment> </FileDropzone> {#if image !== ""} <img src="{image}" alt="test"> {/if} ```js uploadArticleImage: async (file: any) => { const upload_image = await storage.createFile('images', ID.unique(), file);

TypeScript
    return storage.getFilePreview(
        'images',
        upload_image.$id,
        900, 500,
        undefined,
        undefined,
        undefined,
        undefined,
        undefined,
        undefined,
        undefined,
        undefined,
        'webp'
    )
        .toString();
},```
Camo
24 May, 2023, 14:03
Drake
24 May, 2023, 15:46

this doesn't seem related to your original post. it would be best to create a separate post

joeyouss
25 May, 2023, 18:51

[CLOSED] relationship one to many limit, filter.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more