Merge branch 'upstream/staging' into develop

# Conflicts:
#	app/Console/Kernel.php
This commit is contained in:
Mehdi Benadel 2024-02-02 14:28:57 +01:00
commit 92004f4ad4
43 changed files with 651 additions and 259 deletions

View File

@ -15,6 +15,7 @@
- Added User Domain Blocks ([#4834](https://github.com/pixelfed/pixelfed/pull/4834)) ([fa0380ac](https://github.com/pixelfed/pixelfed/commit/fa0380ac))
- Added Parental Controls ([#4862](https://github.com/pixelfed/pixelfed/pull/4862)) ([c91f1c59](https://github.com/pixelfed/pixelfed/commit/c91f1c59))
- Added Forgot Email Feature ([67c650b1](https://github.com/pixelfed/pixelfed/commit/67c650b1))
- Added S3 IG Import Media Storage support ([#4891](https://github.com/pixelfed/pixelfed/pull/4891)) ([081360b9](https://github.com/pixelfed/pixelfed/commit/081360b9))
### Federation
- Update Privacy Settings, add support for Mastodon `indexable` search flag ([fc24630e](https://github.com/pixelfed/pixelfed/commit/fc24630e))
@ -89,6 +90,8 @@
- Update meta tags, improve descriptions and seo/og tags ([fd44c80c](https://github.com/pixelfed/pixelfed/commit/fd44c80c))
- Update login view, add email prefill logic ([d76f0168](https://github.com/pixelfed/pixelfed/commit/d76f0168))
- Update LoginController, fix captcha validation error message ([0325e171](https://github.com/pixelfed/pixelfed/commit/0325e171))
- Update ApiV1Controller, properly cast boolean sensitive parameter. Fixes #4888 ([0aff126a](https://github.com/pixelfed/pixelfed/commit/0aff126a))
- Update AccountImport.vue, fix new IG export format ([59aa6a4b](https://github.com/pixelfed/pixelfed/commit/59aa6a4b))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.9 (2023-08-21)](https://github.com/pixelfed/pixelfed/compare/v0.11.8...v0.11.9)

View File

@ -0,0 +1,54 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\ImportPost;
use App\Jobs\ImportPipeline\ImportMediaToCloudPipeline;
use function Laravel\Prompts\progress;
class ImportUploadMediaToCloudStorage extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:import-upload-media-to-cloud-storage {--limit=500}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Migrate media imported from Instagram to S3 cloud storage.';
/**
* Execute the console command.
*/
public function handle()
{
if(
(bool) config('import.instagram.storage.cloud.enabled') === false ||
(bool) config_cache('pixelfed.cloud_storage') === false
) {
$this->error('Aborted. Cloud storage is not enabled for IG imports.');
return;
}
$limit = $this->option('limit');
$progress = progress(label: 'Migrating import media', steps: $limit);
$progress->start();
$posts = ImportPost::whereUploadedToS3(false)->take($limit)->get();
foreach($posts as $post) {
ImportMediaToCloudPipeline::dispatch($post)->onQueue('low');
$progress->advance();
}
$progress->finish();
}
}

View File

@ -42,6 +42,10 @@ class Kernel extends ConsoleKernel
$schedule->command('app:import-upload-garbage-collection')->hourlyAt(51)->onOneServer();
$schedule->command('app:import-remove-deleted-accounts')->hourlyAt(37)->onOneServer();
$schedule->command('app:import-upload-clean-storage')->twiceDailyAt(1, 13, 32)->onOneServer();
if(config('import.instagram.storage.cloud.enabled') && (bool) config_cache('pixelfed.cloud_storage')) {
$schedule->command('app:import-upload-media-to-cloud-storage')->hourlyAt(39)->onOneServer();
}
}
$schedule->command('app:notification-epoch-update')->weeklyOn(1, '2:21')->onOneServer();
$schedule->command('app:hashtag-cached-count-update')->hourlyAt(25)->onOneServer();

View File

@ -3031,7 +3031,7 @@ class ApiV1Controller extends Controller
$content = strip_tags($request->input('status'));
$rendered = Autolink::create()->autolink($content);
$cw = $user->profile->cw == true ? true : $request->input('sensitive', false);
$cw = $user->profile->cw == true ? true : $request->boolean('sensitive', false);
$spoilerText = $cw && $request->filled('spoiler_text') ? $request->input('spoiler_text') : null;
if($in_reply_to_id) {

View File

@ -0,0 +1,129 @@
<?php
namespace App\Jobs\ImportPipeline;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\Middleware\WithoutOverlapping;
use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing;
use App\Models\ImportPost;
use App\Media;
use App\Services\MediaStorageService;
use Illuminate\Support\Facades\Storage;
use App\Jobs\VideoPipeline\VideoThumbnailToCloudPipeline;
class ImportMediaToCloudPipeline implements ShouldQueue, ShouldBeUniqueUntilProcessing
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $importPost;
public $timeout = 900;
public $tries = 3;
public $maxExceptions = 1;
public $failOnTimeout = true;
/**
* The number of seconds after which the job's unique lock will be released.
*
* @var int
*/
public $uniqueFor = 3600;
/**
* Get the unique ID for the job.
*/
public function uniqueId(): string
{
return 'import-media-to-cloud-pipeline:ip-id:' . $this->importPost->id;
}
/**
* Get the middleware the job should pass through.
*
* @return array<int, object>
*/
public function middleware(): array
{
return [(new WithoutOverlapping("import-media-to-cloud-pipeline:ip-id:{$this->importPost->id}"))->shared()->dontRelease()];
}
/**
* Delete the job if its models no longer exist.
*
* @var bool
*/
public $deleteWhenMissingModels = true;
/**
* Create a new job instance.
*/
public function __construct(ImportPost $importPost)
{
$this->importPost = $importPost;
}
/**
* Execute the job.
*/
public function handle(): void
{
$ip = $this->importPost;
if(
$ip->status_id === null ||
$ip->uploaded_to_s3 === true ||
(bool) config_cache('pixelfed.cloud_storage') === false) {
return;
}
$media = Media::whereStatusId($ip->status_id)->get();
if(!$media || !$media->count()) {
$importPost = ImportPost::find($ip->id);
$importPost->uploaded_to_s3 = true;
$importPost->save();
return;
}
foreach($media as $mediaPart) {
$this->handleMedia($mediaPart);
}
}
protected function handleMedia($media)
{
$ip = $this->importPost;
$importPost = ImportPost::find($ip->id);
if(!$importPost) {
return;
}
$res = MediaStorageService::move($media);
$importPost->uploaded_to_s3 = true;
$importPost->save();
if(!$res) {
return;
}
if($res === 'invalid file') {
return;
}
if($res === 'success') {
if($media->mime === 'video/mp4') {
VideoThumbnailToCloudPipeline::dispatch($media)->onQueue('low');
} else {
Storage::disk('local')->delete($media->media_path);
}
}
}
}

View File

@ -0,0 +1,147 @@
<?php
namespace App\Jobs\VideoPipeline;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\Middleware\WithoutOverlapping;
use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing;
use Illuminate\Http\File;
use Cache;
use FFMpeg;
use Storage;
use App\Media;
use App\Jobs\MediaPipeline\MediaStoragePipeline;
use App\Util\Media\Blurhash;
use App\Services\MediaService;
use App\Services\StatusService;
use App\Services\ResilientMediaStorageService;
class VideoThumbnailToCloudPipeline implements ShouldQueue, ShouldBeUniqueUntilProcessing
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $media;
public $timeout = 900;
public $tries = 3;
public $maxExceptions = 1;
public $failOnTimeout = true;
public $deleteWhenMissingModels = true;
/**
* The number of seconds after which the job's unique lock will be released.
*
* @var int
*/
public $uniqueFor = 3600;
/**
* Get the unique ID for the job.
*/
public function uniqueId(): string
{
return 'media:video-thumb-to-cloud:id-' . $this->media->id;
}
/**
* Get the middleware the job should pass through.
*
* @return array<int, object>
*/
public function middleware(): array
{
return [(new WithoutOverlapping("media:video-thumb-to-cloud:id-{$this->media->id}"))->shared()->dontRelease()];
}
/**
* Create a new job instance.
*/
public function __construct(Media $media)
{
$this->media = $media;
}
/**
* Execute the job.
*/
public function handle(): void
{
if((bool) config_cache('pixelfed.cloud_storage') === false) {
return;
}
$media = $this->media;
if($media->mime != 'video/mp4') {
return;
}
if($media->profile_id === null || $media->status_id === null) {
return;
}
if($media->thumbnail_url) {
return;
}
$base = $media->media_path;
$path = explode('/', $base);
$name = last($path);
try {
$t = explode('.', $name);
$t = $t[0].'_thumb.jpeg';
$i = count($path) - 1;
$path[$i] = $t;
$save = implode('/', $path);
$video = FFMpeg::open($base)
->getFrameFromSeconds(1)
->export()
->toDisk('local')
->save($save);
if(!$save) {
return;
}
$media->thumbnail_path = $save;
$p = explode('/', $media->media_path);
array_pop($p);
$pt = explode('/', $save);
$thumbname = array_pop($pt);
$storagePath = implode('/', $p);
$thumb = storage_path('app/' . $save);
$thumbUrl = ResilientMediaStorageService::store($storagePath, $thumb, $thumbname);
$media->thumbnail_url = $thumbUrl;
$media->save();
$blurhash = Blurhash::generate($media);
if($blurhash) {
$media->blurhash = $blurhash;
$media->save();
}
if(str_starts_with($save, 'public/m/_v2/') && str_ends_with($save, '.jpeg')) {
Storage::delete($save);
}
if(str_starts_with($media->media_path, 'public/m/_v2/') && str_ends_with($media->media_path, '.mp4')) {
Storage::disk('local')->delete($media->media_path);
}
} catch (Exception $e) {
}
if($media->status_id) {
Cache::forget('status:transformer:media:attachments:' . $media->status_id);
MediaService::del($media->status_id);
Cache::forget('status:thumb:nsfw0' . $media->status_id);
Cache::forget('status:thumb:nsfw1' . $media->status_id);
Cache::forget('pf:services:sh:id:' . $media->status_id);
StatusService::del($media->status_id);
}
}
}

View File

@ -21,28 +21,40 @@ use App\Jobs\AvatarPipeline\AvatarStorageCleanup;
class MediaStorageService {
public static function store(Media $media)
{
if(config_cache('pixelfed.cloud_storage') == true) {
(new self())->cloudStore($media);
}
public static function store(Media $media)
{
if(config_cache('pixelfed.cloud_storage') == true) {
(new self())->cloudStore($media);
}
return;
}
return;
}
public static function avatar($avatar, $local = false, $skipRecentCheck = false)
{
return (new self())->fetchAvatar($avatar, $local, $skipRecentCheck);
}
public static function move(Media $media)
{
if($media->remote_media) {
return;
}
public static function head($url)
{
$c = new Client();
try {
$r = $c->request('HEAD', $url);
} catch (RequestException $e) {
return false;
}
if(config_cache('pixelfed.cloud_storage') == true) {
return (new self())->cloudMove($media);
}
return;
}
public static function avatar($avatar, $local = false, $skipRecentCheck = false)
{
return (new self())->fetchAvatar($avatar, $local, $skipRecentCheck);
}
public static function head($url)
{
$c = new Client();
try {
$r = $c->request('HEAD', $url);
} catch (RequestException $e) {
return false;
}
$h = Arr::mapWithKeys($r->getHeaders(), function($item, $key) {
return [strtolower($key) => last($item)];
@ -55,224 +67,261 @@ class MediaStorageService {
$len = (int) $h['content-length'];
$mime = $h['content-type'];
if($len < 10 || $len > ((config_cache('pixelfed.max_photo_size') * 1000))) {
return false;
}
if($len < 10 || $len > ((config_cache('pixelfed.max_photo_size') * 1000))) {
return false;
}
return [
'length' => $len,
'mime' => $mime
];
}
return [
'length' => $len,
'mime' => $mime
];
}
protected function cloudStore($media)
{
if($media->remote_media == true) {
if(config('media.storage.remote.cloud')) {
(new self())->remoteToCloud($media);
}
} else {
(new self())->localToCloud($media);
}
}
protected function cloudStore($media)
{
if($media->remote_media == true) {
if(config('media.storage.remote.cloud')) {
(new self())->remoteToCloud($media);
}
} else {
(new self())->localToCloud($media);
}
}
protected function localToCloud($media)
{
$path = storage_path('app/'.$media->media_path);
$thumb = storage_path('app/'.$media->thumbnail_path);
protected function localToCloud($media)
{
$path = storage_path('app/'.$media->media_path);
$thumb = storage_path('app/'.$media->thumbnail_path);
$p = explode('/', $media->media_path);
$name = array_pop($p);
$pt = explode('/', $media->thumbnail_path);
$thumbname = array_pop($pt);
$storagePath = implode('/', $p);
$p = explode('/', $media->media_path);
$name = array_pop($p);
$pt = explode('/', $media->thumbnail_path);
$thumbname = array_pop($pt);
$storagePath = implode('/', $p);
$url = ResilientMediaStorageService::store($storagePath, $path, $name);
if($thumb) {
$thumbUrl = ResilientMediaStorageService::store($storagePath, $thumb, $thumbname);
$media->thumbnail_url = $thumbUrl;
}
$media->cdn_url = $url;
$media->optimized_url = $url;
$media->replicated_at = now();
$media->save();
if($media->status_id) {
Cache::forget('status:transformer:media:attachments:' . $media->status_id);
MediaService::del($media->status_id);
StatusService::del($media->status_id, false);
}
}
$url = ResilientMediaStorageService::store($storagePath, $path, $name);
if($thumb) {
$thumbUrl = ResilientMediaStorageService::store($storagePath, $thumb, $thumbname);
$media->thumbnail_url = $thumbUrl;
}
$media->cdn_url = $url;
$media->optimized_url = $url;
$media->replicated_at = now();
$media->save();
if($media->status_id) {
Cache::forget('status:transformer:media:attachments:' . $media->status_id);
MediaService::del($media->status_id);
StatusService::del($media->status_id, false);
}
}
protected function remoteToCloud($media)
{
$url = $media->remote_url;
protected function remoteToCloud($media)
{
$url = $media->remote_url;
if(!Helpers::validateUrl($url)) {
return;
}
if(!Helpers::validateUrl($url)) {
return;
}
$head = $this->head($media->remote_url);
$head = $this->head($media->remote_url);
if(!$head) {
return;
}
if(!$head) {
return;
}
$mimes = [
'image/jpeg',
'image/png',
'video/mp4'
];
$mimes = [
'image/jpeg',
'image/png',
'video/mp4'
];
$mime = $head['mime'];
$max_size = (int) config_cache('pixelfed.max_photo_size') * 1000;
$media->size = $head['length'];
$media->remote_media = true;
$media->save();
$mime = $head['mime'];
$max_size = (int) config_cache('pixelfed.max_photo_size') * 1000;
$media->size = $head['length'];
$media->remote_media = true;
$media->save();
if(!in_array($mime, $mimes)) {
return;
}
if(!in_array($mime, $mimes)) {
return;
}
if($head['length'] >= $max_size) {
return;
}
if($head['length'] >= $max_size) {
return;
}
switch ($mime) {
case 'image/png':
$ext = '.png';
break;
switch ($mime) {
case 'image/png':
$ext = '.png';
break;
case 'image/gif':
$ext = '.gif';
break;
case 'image/gif':
$ext = '.gif';
break;
case 'image/jpeg':
$ext = '.jpg';
break;
case 'image/jpeg':
$ext = '.jpg';
break;
case 'video/mp4':
$ext = '.mp4';
break;
}
case 'video/mp4':
$ext = '.mp4';
break;
}
$base = MediaPathService::get($media->profile);
$path = Str::random(40) . $ext;
$tmpBase = storage_path('app/remcache/');
$tmpPath = $media->profile_id . '-' . $path;
$tmpName = $tmpBase . $tmpPath;
$data = file_get_contents($url, false, null, 0, $head['length']);
file_put_contents($tmpName, $data);
$hash = hash_file('sha256', $tmpName);
$base = MediaPathService::get($media->profile);
$path = Str::random(40) . $ext;
$tmpBase = storage_path('app/remcache/');
$tmpPath = $media->profile_id . '-' . $path;
$tmpName = $tmpBase . $tmpPath;
$data = file_get_contents($url, false, null, 0, $head['length']);
file_put_contents($tmpName, $data);
$hash = hash_file('sha256', $tmpName);
$disk = Storage::disk(config('filesystems.cloud'));
$file = $disk->putFileAs($base, new File($tmpName), $path, 'public');
$permalink = $disk->url($file);
$disk = Storage::disk(config('filesystems.cloud'));
$file = $disk->putFileAs($base, new File($tmpName), $path, 'public');
$permalink = $disk->url($file);
$media->media_path = $file;
$media->cdn_url = $permalink;
$media->original_sha256 = $hash;
$media->replicated_at = now();
$media->save();
$media->media_path = $file;
$media->cdn_url = $permalink;
$media->original_sha256 = $hash;
$media->replicated_at = now();
$media->save();
if($media->status_id) {
Cache::forget('status:transformer:media:attachments:' . $media->status_id);
}
if($media->status_id) {
Cache::forget('status:transformer:media:attachments:' . $media->status_id);
}
unlink($tmpName);
}
unlink($tmpName);
}
protected function fetchAvatar($avatar, $local = false, $skipRecentCheck = false)
{
$queue = random_int(1, 15) > 5 ? 'mmo' : 'low';
$url = $avatar->remote_url;
$driver = $local ? 'local' : config('filesystems.cloud');
protected function fetchAvatar($avatar, $local = false, $skipRecentCheck = false)
{
$queue = random_int(1, 15) > 5 ? 'mmo' : 'low';
$url = $avatar->remote_url;
$driver = $local ? 'local' : config('filesystems.cloud');
if(empty($url) || Helpers::validateUrl($url) == false) {
return;
}
if(empty($url) || Helpers::validateUrl($url) == false) {
return;
}
$head = $this->head($url);
$head = $this->head($url);
if($head == false) {
return;
}
if($head == false) {
return;
}
$mimes = [
'application/octet-stream',
'image/jpeg',
'image/png',
];
$mimes = [
'application/octet-stream',
'image/jpeg',
'image/png',
];
$mime = $head['mime'];
$max_size = (int) config('pixelfed.max_avatar_size') * 1000;
$mime = $head['mime'];
$max_size = (int) config('pixelfed.max_avatar_size') * 1000;
if(!$skipRecentCheck) {
if($avatar->last_fetched_at && $avatar->last_fetched_at->gt(now()->subMonths(3))) {
return;
}
}
if(!$skipRecentCheck) {
if($avatar->last_fetched_at && $avatar->last_fetched_at->gt(now()->subMonths(3))) {
return;
}
}
Cache::forget('avatar:' . $avatar->profile_id);
AccountService::del($avatar->profile_id);
Cache::forget('avatar:' . $avatar->profile_id);
AccountService::del($avatar->profile_id);
// handle pleroma edge case
if(Str::endsWith($mime, '; charset=utf-8')) {
$mime = str_replace('; charset=utf-8', '', $mime);
}
// handle pleroma edge case
if(Str::endsWith($mime, '; charset=utf-8')) {
$mime = str_replace('; charset=utf-8', '', $mime);
}
if(!in_array($mime, $mimes)) {
return;
}
if(!in_array($mime, $mimes)) {
return;
}
if($head['length'] >= $max_size) {
return;
}
if($head['length'] >= $max_size) {
return;
}
$base = ($local ? 'public/cache/' : 'cache/') . 'avatars/' . $avatar->profile_id;
$ext = $head['mime'] == 'image/jpeg' ? 'jpg' : 'png';
$path = 'avatar_' . strtolower(Str::random(random_int(3,6))) . '.' . $ext;
$tmpBase = storage_path('app/remcache/');
$tmpPath = 'avatar_' . $avatar->profile_id . '-' . $path;
$tmpName = $tmpBase . $tmpPath;
$data = @file_get_contents($url, false, null, 0, $head['length']);
if(!$data) {
return;
}
file_put_contents($tmpName, $data);
$base = ($local ? 'public/cache/' : 'cache/') . 'avatars/' . $avatar->profile_id;
$ext = $head['mime'] == 'image/jpeg' ? 'jpg' : 'png';
$path = 'avatar_' . strtolower(Str::random(random_int(3,6))) . '.' . $ext;
$tmpBase = storage_path('app/remcache/');
$tmpPath = 'avatar_' . $avatar->profile_id . '-' . $path;
$tmpName = $tmpBase . $tmpPath;
$data = @file_get_contents($url, false, null, 0, $head['length']);
if(!$data) {
return;
}
file_put_contents($tmpName, $data);
$mimeCheck = Storage::mimeType('remcache/' . $tmpPath);
$mimeCheck = Storage::mimeType('remcache/' . $tmpPath);
if(!$mimeCheck || !in_array($mimeCheck, ['image/png', 'image/jpeg'])) {
$avatar->last_fetched_at = now();
$avatar->save();
unlink($tmpName);
return;
}
if(!$mimeCheck || !in_array($mimeCheck, ['image/png', 'image/jpeg'])) {
$avatar->last_fetched_at = now();
$avatar->save();
unlink($tmpName);
return;
}
$disk = Storage::disk($driver);
$file = $disk->putFileAs($base, new File($tmpName), $path, 'public');
$permalink = $disk->url($file);
$disk = Storage::disk($driver);
$file = $disk->putFileAs($base, new File($tmpName), $path, 'public');
$permalink = $disk->url($file);
$avatar->media_path = $base . '/' . $path;
$avatar->is_remote = true;
$avatar->cdn_url = $local ? config('app.url') . $permalink : $permalink;
$avatar->size = $head['length'];
$avatar->change_count = $avatar->change_count + 1;
$avatar->last_fetched_at = now();
$avatar->save();
$avatar->media_path = $base . '/' . $path;
$avatar->is_remote = true;
$avatar->cdn_url = $local ? config('app.url') . $permalink : $permalink;
$avatar->size = $head['length'];
$avatar->change_count = $avatar->change_count + 1;
$avatar->last_fetched_at = now();
$avatar->save();
Cache::forget('avatar:' . $avatar->profile_id);
AccountService::del($avatar->profile_id);
AvatarStorageCleanup::dispatch($avatar)->onQueue($queue)->delay(now()->addMinutes(random_int(3, 15)));
Cache::forget('avatar:' . $avatar->profile_id);
AccountService::del($avatar->profile_id);
AvatarStorageCleanup::dispatch($avatar)->onQueue($queue)->delay(now()->addMinutes(random_int(3, 15)));
unlink($tmpName);
}
unlink($tmpName);
}
public static function delete(Media $media, $confirm = false)
{
if(!$confirm) {
return;
}
MediaDeletePipeline::dispatch($media)->onQueue('mmo');
}
public static function delete(Media $media, $confirm = false)
{
if(!$confirm) {
return;
}
MediaDeletePipeline::dispatch($media)->onQueue('mmo');
}
protected function cloudMove($media)
{
if(!Storage::exists($media->media_path)) {
return 'invalid file';
}
$path = storage_path('app/'.$media->media_path);
$thumb = false;
if($media->thumbnail_path) {
$thumb = storage_path('app/'.$media->thumbnail_path);
$pt = explode('/', $media->thumbnail_path);
$thumbname = array_pop($pt);
}
$p = explode('/', $media->media_path);
$name = array_pop($p);
$storagePath = implode('/', $p);
$url = ResilientMediaStorageService::store($storagePath, $path, $name);
if($thumb) {
$thumbUrl = ResilientMediaStorageService::store($storagePath, $thumb, $thumbname);
$media->thumbnail_url = $thumbUrl;
}
$media->cdn_url = $url;
$media->optimized_url = $url;
$media->replicated_at = now();
$media->save();
if($media->status_id) {
Cache::forget('status:transformer:media:attachments:' . $media->status_id);
MediaService::del($media->status_id);
StatusService::del($media->status_id, false);
}
return 'success';
}
}

View File

@ -39,6 +39,12 @@ return [
// Limit to specific user ids, in comma separated format
'user_ids' => env('PF_IMPORT_IG_PERM_ONLY_USER_IDS', null),
],
'storage' => [
'cloud' => [
'enabled' => env('PF_IMPORT_IG_CLOUD_STORAGE', env('PF_ENABLE_CLOUD', false)),
]
]
]
];

File diff suppressed because one or more lines are too long

2
public/js/admin.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(()=>{"use strict";var e,r,n,o={},t={};function d(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,d),n.loaded=!0,n.exports}d.m=o,e=[],d.O=(r,n,o,t)=>{if(!n){var c=1/0;for(l=0;l<e.length;l++){for(var[n,o,t]=e[l],a=!0,i=0;i<n.length;i++)(!1&t||c>=t)&&Object.keys(d.O).every((e=>d.O[e](n[i])))?n.splice(i--,1):(a=!1,t<c&&(c=t));if(a){e.splice(l--,1);var s=o();void 0!==s&&(r=s)}}return r}t=t||0;for(var l=e.length;l>0&&e[l-1][2]>t;l--)e[l]=e[l-1];e[l]=[n,o,t]},d.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return d.d(r,{a:r}),r},d.d=(e,r)=>{for(var n in r)d.o(r,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((r,n)=>(d.f[n](e,r),r)),[])),d.u=e=>"js/"+{1084:"profile~followers.bundle",2470:"home.chunk",2530:"discover~myhashtags.chunk",2586:"compose.chunk",2732:"dms~message.chunk",3351:"discover~settings.chunk",3365:"dms.chunk",3623:"discover~findfriends.chunk",4028:"error404.bundle",4958:"discover.chunk",4965:"discover~memories.chunk",5865:"post.chunk",6053:"notifications.chunk",6869:"profile.chunk",7019:"discover~hashtag.bundle",8250:"i18n.bundle",8517:"daci.chunk",8600:"changelog.bundle",8625:"profile~following.bundle",8900:"discover~serverfeed.chunk"}[e]+"."+{1084:"731f680cfb96563d",2470:"351f55e9d09b6482",2530:"6eab2414b2b16e19",2586:"10e7f993dcc726f9",2732:"15157ff4a6c17cc7",3351:"732c1f76a00d9204",3365:"53a951c5de2d95ac",3623:"02be60ab26503531",4028:"3bbc118159460db6",4958:"9606885dad3c8a99",4965:"ce9cc6446020e9b3",5865:"23fc9e82d4fadc83",6053:"3b92cf46da469de1",6869:"0e5bd852054d6355",7019:"9cfffc517f35044e",8250:"47cbf9f04d955267",8517:"b17a0b11877389d7",8600:"742a06ba0a547120",8625:"3d95796c9f1678dd",8900:"0f2dcc473fdce17e"}[e]+".js",d.miniCssF=e=>({138:"css/spa",703:"css/admin",1242:"css/appdark",6170:"css/app",8737:"css/portfolio",9994:"css/landing"}[e]+".css"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},n="pixelfed:",d.l=(e,o,t,c)=>{if(r[e])r[e].push(o);else{var a,i;if(void 0!==t)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==n+t){a=f;break}}a||(i=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,d.nc&&a.setAttribute("nonce",d.nc),a.setAttribute("data-webpack",n+t),a.src=e),r[e]=[o];var u=(n,o)=>{a.onerror=a.onload=null,clearTimeout(b);var t=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),t&&t.forEach((e=>e(o))),n)return n(o)},b=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),i&&document.head.appendChild(a)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),d.p="/",(()=>{var e={8929:0,1242:0,6170:0,8737:0,703:0,9994:0,138:0};d.f.j=(r,n)=>{var o=d.o(e,r)?e[r]:void 0;if(0!==o)if(o)n.push(o[2]);else if(/^(1242|138|6170|703|8737|8929|9994)$/.test(r))e[r]=0;else{var t=new Promise(((n,t)=>o=e[r]=[n,t]));n.push(o[2]=t);var c=d.p+d.u(r),a=new Error;d.l(c,(n=>{if(d.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var t=n&&("load"===n.type?"missing":n.type),c=n&&n.target&&n.target.src;a.message="Loading chunk "+r+" failed.\n("+t+": "+c+")",a.name="ChunkLoadError",a.type=t,a.request=c,o[1](a)}}),"chunk-"+r,r)}},d.O.j=r=>0===e[r];var r=(r,n)=>{var o,t,[c,a,i]=n,s=0;if(c.some((r=>0!==e[r]))){for(o in a)d.o(a,o)&&(d.m[o]=a[o]);if(i)var l=i(d)}for(r&&r(n);s<c.length;s++)t=c[s],d.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return d.O(l)},n=self.webpackChunkpixelfed=self.webpackChunkpixelfed||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),d.nc=void 0})();
(()=>{"use strict";var e,r,n,o={},t={};function d(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,d),n.loaded=!0,n.exports}d.m=o,e=[],d.O=(r,n,o,t)=>{if(!n){var a=1/0;for(l=0;l<e.length;l++){for(var[n,o,t]=e[l],i=!0,c=0;c<n.length;c++)(!1&t||a>=t)&&Object.keys(d.O).every((e=>d.O[e](n[c])))?n.splice(c--,1):(i=!1,t<a&&(a=t));if(i){e.splice(l--,1);var s=o();void 0!==s&&(r=s)}}return r}t=t||0;for(var l=e.length;l>0&&e[l-1][2]>t;l--)e[l]=e[l-1];e[l]=[n,o,t]},d.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return d.d(r,{a:r}),r},d.d=(e,r)=>{for(var n in r)d.o(r,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((r,n)=>(d.f[n](e,r),r)),[])),d.u=e=>"js/"+{1084:"profile~followers.bundle",2470:"home.chunk",2530:"discover~myhashtags.chunk",2586:"compose.chunk",2732:"dms~message.chunk",3351:"discover~settings.chunk",3365:"dms.chunk",3623:"discover~findfriends.chunk",4028:"error404.bundle",4958:"discover.chunk",4965:"discover~memories.chunk",5865:"post.chunk",6053:"notifications.chunk",6869:"profile.chunk",7019:"discover~hashtag.bundle",8250:"i18n.bundle",8517:"daci.chunk",8600:"changelog.bundle",8625:"profile~following.bundle",8900:"discover~serverfeed.chunk"}[e]+"."+{1084:"5deed93248f20662",2470:"f3f4f632025b560f",2530:"a72fc4882db8afd3",2586:"1ac292c93b524406",2732:"76edeafda3d92320",3351:"be88dc5ba1a24a7d",3365:"53a951c5de2d95ac",3623:"941b524eee8b8d63",4028:"3bbc118159460db6",4958:"b1846efb6bd1e43c",4965:"7d917826c3e9f17b",5865:"eb9804ff282909ae",6053:"3b92cf46da469de1",6869:"d52916cb68c9a146",7019:"6c2ff384b17ea58d",8250:"47cbf9f04d955267",8517:"8d4acc1db3f27a51",8600:"742a06ba0a547120",8625:"d2b3b1fc2e05dbd3",8900:"8365948d1867de3a"}[e]+".js",d.miniCssF=e=>({138:"css/spa",703:"css/admin",1242:"css/appdark",6170:"css/app",8737:"css/portfolio",9994:"css/landing"}[e]+".css"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},n="pixelfed:",d.l=(e,o,t,a)=>{if(r[e])r[e].push(o);else{var i,c;if(void 0!==t)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==n+t){i=f;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,d.nc&&i.setAttribute("nonce",d.nc),i.setAttribute("data-webpack",n+t),i.src=e),r[e]=[o];var u=(n,o)=>{i.onerror=i.onload=null,clearTimeout(b);var t=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),t&&t.forEach((e=>e(o))),n)return n(o)},b=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),c&&document.head.appendChild(i)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),d.p="/",(()=>{var e={8929:0,1242:0,6170:0,8737:0,703:0,9994:0,138:0};d.f.j=(r,n)=>{var o=d.o(e,r)?e[r]:void 0;if(0!==o)if(o)n.push(o[2]);else if(/^(1242|138|6170|703|8737|8929|9994)$/.test(r))e[r]=0;else{var t=new Promise(((n,t)=>o=e[r]=[n,t]));n.push(o[2]=t);var a=d.p+d.u(r),i=new Error;d.l(a,(n=>{if(d.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var t=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;i.message="Loading chunk "+r+" failed.\n("+t+": "+a+")",i.name="ChunkLoadError",i.type=t,i.request=a,o[1](i)}}),"chunk-"+r,r)}},d.O.j=r=>0===e[r];var r=(r,n)=>{var o,t,[a,i,c]=n,s=0;if(a.some((r=>0!==e[r]))){for(o in i)d.o(i,o)&&(d.m[o]=i[o]);if(c)var l=c(d)}for(r&&r(n);s<a.length;s++)t=a[s],d.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return d.O(l)},n=self.webpackChunkpixelfed=self.webpackChunkpixelfed||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),d.nc=void 0})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
public/js/spa.js vendored

File diff suppressed because one or more lines are too long

2
public/js/status.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,45 +3,45 @@
"/js/activity.js": "/js/activity.js?id=bab5c110c78fbf44118ba9d43de424e3",
"/js/components.js": "/js/components.js?id=9f8d82f1340d91a3be0910a1ae0557a1",
"/js/discover.js": "/js/discover.js?id=789db642d4214d69b245210243bfddd1",
"/js/profile.js": "/js/profile.js?id=ff5ebfe2c05af42a90710184b4a77539",
"/js/status.js": "/js/status.js?id=28214c81b6ef1b443735edb12a3e2af3",
"/js/timeline.js": "/js/timeline.js?id=6af047689b6d4871c816eb9bbd258d6c",
"/js/compose.js": "/js/compose.js?id=17cac013a117745417d908362686b48f",
"/js/profile.js": "/js/profile.js?id=96606c2e76979a5cb9a4675c11678d82",
"/js/status.js": "/js/status.js?id=d66fc614dbcc1d947a93dc6e142112e6",
"/js/timeline.js": "/js/timeline.js?id=fa56bf59d1587e728b24e715a8891049",
"/js/compose.js": "/js/compose.js?id=3e3f91673e689cb5ad0ef33f31a454a3",
"/js/compose-classic.js": "/js/compose-classic.js?id=6a1e3218c8d3753687e01aeaad9362c9",
"/js/search.js": "/js/search.js?id=4c0e6f5e1b7f43de760c28143605a161",
"/js/developers.js": "/js/developers.js?id=5c04c9c265a39ff23dd395fc56a0eada",
"/js/hashtag.js": "/js/hashtag.js?id=ede3503b82bd2c3dc031cb1a4f70320d",
"/js/collectioncompose.js": "/js/collectioncompose.js?id=4ce940e158d15205ad480821d3d8cd0c",
"/js/collections.js": "/js/collections.js?id=c081a4a410b0e1221ab5d549da906874",
"/js/collectioncompose.js": "/js/collectioncompose.js?id=a727c163315ee50c3e28fb43fce46d2f",
"/js/collections.js": "/js/collections.js?id=86db63fcc018f873d8989321996afdfd",
"/js/profile-directory.js": "/js/profile-directory.js?id=9b8a56ca460ece9bcd0dcfc4e5d7fa2b",
"/js/story-compose.js": "/js/story-compose.js?id=08a03cf5642c4dcfec5ad2ef78f83c00",
"/js/direct.js": "/js/direct.js?id=74c2962c91cfa3817126b093c3e8112d",
"/js/admin.js": "/js/admin.js?id=595d4b9958efa0ddbfde64af285fe365",
"/js/spa.js": "/js/spa.js?id=3d4942f9a9920995110f87454f9a5979",
"/js/stories.js": "/js/stories.js?id=709b3201264dd2e3776f03ec3393d6b4",
"/js/portfolio.js": "/js/portfolio.js?id=f44a3a87fee04698b55d91a4231fcb8f",
"/js/account-import.js": "/js/account-import.js?id=71ac9c7b86270addf9e05c72ed3d76f5",
"/js/admin.js": "/js/admin.js?id=651f030c2077b81722cd9ac870a2f4d7",
"/js/spa.js": "/js/spa.js?id=e81eb6d446f2a8e67a0eba8c2e2fd136",
"/js/stories.js": "/js/stories.js?id=42cdb37f35edf773bd2737f63c5e0e46",
"/js/portfolio.js": "/js/portfolio.js?id=ca5d49097cd9273f3b22ef210bd2930f",
"/js/account-import.js": "/js/account-import.js?id=2664389c5645f91ad74c99e5871afb86",
"/js/admin_invite.js": "/js/admin_invite.js?id=285b7aab611b66b12e16fb95c5cd6a24",
"/js/landing.js": "/js/landing.js?id=0b4df98090afe60d42a25fae96b70a69",
"/js/landing.js": "/js/landing.js?id=b87dd6bea094176c0eae6efc32dcedd4",
"/js/remote_auth.js": "/js/remote_auth.js?id=8a261c63271e4f126bc259ca94fe691c",
"/js/manifest.js": "/js/manifest.js?id=07bf3cac0b7ce275ad1465fff457eebf",
"/js/home.chunk.351f55e9d09b6482.js": "/js/home.chunk.351f55e9d09b6482.js?id=78bec7e00db7fa42970b7fee6ae42fc8",
"/js/compose.chunk.10e7f993dcc726f9.js": "/js/compose.chunk.10e7f993dcc726f9.js?id=1ff97cb97bbe1ef6405aaf1367111f9d",
"/js/post.chunk.23fc9e82d4fadc83.js": "/js/post.chunk.23fc9e82d4fadc83.js?id=35af81651750a662b0bde9c2e9cd202f",
"/js/profile.chunk.0e5bd852054d6355.js": "/js/profile.chunk.0e5bd852054d6355.js?id=c79db9a7ed9e593c2565f6fe2647ddaa",
"/js/discover~memories.chunk.ce9cc6446020e9b3.js": "/js/discover~memories.chunk.ce9cc6446020e9b3.js?id=05823cac888d03c4a02db391f0497207",
"/js/discover~myhashtags.chunk.6eab2414b2b16e19.js": "/js/discover~myhashtags.chunk.6eab2414b2b16e19.js?id=3296235c4dfc2b53ec12fa3efd6b2853",
"/js/daci.chunk.b17a0b11877389d7.js": "/js/daci.chunk.b17a0b11877389d7.js?id=1c6970aaeedd8cd3fdbaed3f811275d5",
"/js/discover~findfriends.chunk.02be60ab26503531.js": "/js/discover~findfriends.chunk.02be60ab26503531.js?id=9209716c69387daba81d325b8b4036ed",
"/js/discover~serverfeed.chunk.0f2dcc473fdce17e.js": "/js/discover~serverfeed.chunk.0f2dcc473fdce17e.js?id=85fb14dec99be1da2253de939d71ac07",
"/js/discover~settings.chunk.732c1f76a00d9204.js": "/js/discover~settings.chunk.732c1f76a00d9204.js?id=269715e328ff4e8806ae5313141bfba2",
"/js/discover.chunk.9606885dad3c8a99.js": "/js/discover.chunk.9606885dad3c8a99.js?id=861905f74c741b4ba0adea34a6fd1755",
"/js/manifest.js": "/js/manifest.js?id=630d979b36a5a9ee6b4ac58192d44c55",
"/js/home.chunk.f3f4f632025b560f.js": "/js/home.chunk.f3f4f632025b560f.js?id=d665e37704110e04c5b26abe37922c54",
"/js/compose.chunk.1ac292c93b524406.js": "/js/compose.chunk.1ac292c93b524406.js?id=9f2ed8b63c8ccea71948decd16951945",
"/js/post.chunk.eb9804ff282909ae.js": "/js/post.chunk.eb9804ff282909ae.js?id=edfea2631b019f79bf694711b313ed69",
"/js/profile.chunk.d52916cb68c9a146.js": "/js/profile.chunk.d52916cb68c9a146.js?id=12cceca2cf40ade55dd52e55beaebcf5",
"/js/discover~memories.chunk.7d917826c3e9f17b.js": "/js/discover~memories.chunk.7d917826c3e9f17b.js?id=3b50240fbfca28317e019ef8e375d865",
"/js/discover~myhashtags.chunk.a72fc4882db8afd3.js": "/js/discover~myhashtags.chunk.a72fc4882db8afd3.js?id=c0e12b1a3be84c004d1700fb75887581",
"/js/daci.chunk.8d4acc1db3f27a51.js": "/js/daci.chunk.8d4acc1db3f27a51.js?id=0b35553f31b4378434c15a95e2858ff2",
"/js/discover~findfriends.chunk.941b524eee8b8d63.js": "/js/discover~findfriends.chunk.941b524eee8b8d63.js?id=a2950b1a47385297a4043ae43696df7b",
"/js/discover~serverfeed.chunk.8365948d1867de3a.js": "/js/discover~serverfeed.chunk.8365948d1867de3a.js?id=89630daaa6bde72cc02f384a2900b1f5",
"/js/discover~settings.chunk.be88dc5ba1a24a7d.js": "/js/discover~settings.chunk.be88dc5ba1a24a7d.js?id=a3f32fbeda24adb25a8e59635ace31b5",
"/js/discover.chunk.b1846efb6bd1e43c.js": "/js/discover.chunk.b1846efb6bd1e43c.js?id=2304806be2805804a9cfc72499899379",
"/js/notifications.chunk.3b92cf46da469de1.js": "/js/notifications.chunk.3b92cf46da469de1.js?id=ce1e415ef9e593daa8fc8ca24c39ae5d",
"/js/dms.chunk.53a951c5de2d95ac.js": "/js/dms.chunk.53a951c5de2d95ac.js?id=533dabb38bd88ce40224b262de5657ca",
"/js/dms~message.chunk.15157ff4a6c17cc7.js": "/js/dms~message.chunk.15157ff4a6c17cc7.js?id=24a896bd3e1ae7ad95eb84ffed03897b",
"/js/profile~followers.bundle.731f680cfb96563d.js": "/js/profile~followers.bundle.731f680cfb96563d.js?id=51a86ce073dcc37182ad95690d3e4150",
"/js/profile~following.bundle.3d95796c9f1678dd.js": "/js/profile~following.bundle.3d95796c9f1678dd.js?id=fab18cec2854cbe0bedeff75a8cd72d7",
"/js/discover~hashtag.bundle.9cfffc517f35044e.js": "/js/discover~hashtag.bundle.9cfffc517f35044e.js?id=09cc057075bddf54f6d27a3d1325956e",
"/js/dms~message.chunk.76edeafda3d92320.js": "/js/dms~message.chunk.76edeafda3d92320.js?id=e4ac7551e891590cd58c0668c83649cc",
"/js/profile~followers.bundle.5deed93248f20662.js": "/js/profile~followers.bundle.5deed93248f20662.js?id=397cafef10eed6b75dd9f54e6266eef4",
"/js/profile~following.bundle.d2b3b1fc2e05dbd3.js": "/js/profile~following.bundle.d2b3b1fc2e05dbd3.js?id=a354e771c03b7abdbb84e3c45d5e6ac7",
"/js/discover~hashtag.bundle.6c2ff384b17ea58d.js": "/js/discover~hashtag.bundle.6c2ff384b17ea58d.js?id=a6721eb61d5320e1a6b75091e7bc96cd",
"/js/error404.bundle.3bbc118159460db6.js": "/js/error404.bundle.3bbc118159460db6.js?id=93a2596acb6a7aca829217405e29cf3c",
"/js/i18n.bundle.47cbf9f04d955267.js": "/js/i18n.bundle.47cbf9f04d955267.js?id=6c2e24f203d5b9ff4e21ee7bb614c0d8",
"/js/changelog.bundle.742a06ba0a547120.js": "/js/changelog.bundle.742a06ba0a547120.js?id=e7fed759d5bb60a805e069b0e628a00e",

View File

@ -381,7 +381,7 @@
let file = this.$refs.zipInput.files[0];
let entries = await this.model(file);
if (entries && entries.length) {
let files = await entries.filter(e => e.filename === 'content/posts_1.json');
let files = await entries.filter(e => e.filename === 'content/posts_1.json' || e.filename === 'your_instagram_activity/content/posts_1.json');
if(!files || !files.length) {
this.contactModal(
@ -402,7 +402,7 @@
let entries = await this.model(file);
if (entries && entries.length) {
this.zipFiles = entries;
let media = await entries.filter(e => e.filename === 'content/posts_1.json')[0].getData(new zip.TextWriter());
let media = await entries.filter(e => e.filename === 'content/posts_1.json' || e.filename === 'your_instagram_activity/content/posts_1.json')[0].getData(new zip.TextWriter());
this.filterPostMeta(media);
let imgs = await Promise.all(entries.filter(entry => {