mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 05:43:04 +00:00
1.9 KiB
1.9 KiB
Verification Report
1. Accepted File Types
- Claim:
.mp4,.webm,.mov,.mkv,.ts,.m3u8,.mpg,.mpeg. - Code:
components/upload-modal.html<input id="input-file" type="file" class="hidden" accept="video/*,.m3u8,.ts,.mp4,.webm,.mov,.mkv,.mpg,.mpeg" /> - Status: Verified.
2. File Size Limits
- Claim: 2GB recommended due to browser memory hashing.
- Code:
js/services/s3UploadService.jscallsthis.deps.calculateTorrentInfoHash(file).js/utils/torrentHash.jsreads file into memory/buffer for hashing. - Status: Verified.
3. Metadata Validation
- Claim: Title required. HTTPS for URLs.
- Code:
js/services/videoNotePayload.js:if (!legacyFormData.title) errors.push(VIDEO_NOTE_ERROR_CODES.MISSING_TITLE); if (legacyFormData.url && !/^https:\/\//i.test(legacyFormData.url)) errors.push(VIDEO_NOTE_ERROR_CODES.INVALID_URL_PROTOCOL); - Status: Verified.
4. CORS Policy
- Claim: JSON policy provided in docs.
- Code:
js/storage/s3-multipart.jsensureBucketCorsconstructs the policy dynamically but matches the structure (AllowedOrigins, AllowedMethods, AllowedHeaders=["*"], ExposeHeaders=[ETag, ...]). - Status: Verified.
5. Upload Lifecycle
- Claim: "The client handles the upload, generates a magnet link...".
- Code:
js/ui/components/UploadModal.jshandleVideoSelectionuploads video, then callsgenerateTorrentMetadata, then uploads.torrentfile if successful. - Gap: Docs do not explicitly mention that a
.torrentfile is also uploaded to the bucket. - Recommendation: Update docs to mention
.torrentfile generation and upload.
6. S3/R2 Configuration
- Claim: Supports S3 and R2.
- Code:
js/services/s3Service.jsandjs/services/storageService.jshandle these providers. - Status: Verified.