![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@jrmc/adonis-attachment
Advanced tools
Turn any field on your Lucid model to an attachment data type
This package is currently development and will replace attachment-advanced for AdonisJS 6.
Project sample : adonis-starter-kit
⚠️ Breaking change version 2, include @adonisjs/drive
Install and configure the package:
node ace add @jrmc/adonis-attachment
Simple upload file
// app/models/user.ts
import { BaseModel } from '@adonisjs/lucid/orm'
import { compose } from '@adonisjs/core/helpers'
import { attachment, Attachmentable } from '@jrmc/adonis-attachment'
import type { Attachment } from '@jrmc/adonis-attachment/types/attachment'
class User extends compose(BaseModel, Attachmentable) {
@attachment()
declare avatar: Attachment
}
// app/controllers/users_controller.ts
import { attachmentManager } from '@jrmc/adonis-attachment'
class UsersController {
public store({ request }: HttpContext) {
const avatar = request.file('avatar')!
const user = new User()
user.avatar = await attachmentManager.createFromFile(avatar)
await user.save()
}
}
<img src="{{ await user.avatar.getUrl() }}" loading="lazy" alt="" />
Read documentation for advanced usage(thumbnail video/pdf/doc, create from buffer/base64...)
FAQs
Turn any field on your Lucid model to an attachment data type
We found that @jrmc/adonis-attachment demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.