can anyone add FTP external storage server to this extension? I even will pay for that.
I just want uploaded files save to another server via FTP connection.
FriendsOfFlarum upload, the intelligent file attachment extension
I am trying to upload microsoft documents. I got the mime types added but when I try to upload a docx file or pptx file I get an error saying those are not supported.
video\/(3gpp|mp4|mpeg|quicktime|webm))|(audio\/(aiff|midi|mpeg|mp4))|(image\/(gif|jpeg|png))|(application\/(x-(7z|rar|zip)-compressed|zip|arj|x-(bzip2|gzip|lha|stuffit|tar)|pdf|Vnd.openxmlformats-officedocument.wordprocessingml.document|Vnd.openxmlformats-officedocument.presentationml.presentation|Vnd.openxmlformats-officedocument.spreadsheetml.sheet|msword|vnd.ms-powerpoint|vnd.ms-excel))
Davippi I use this:
^application\/(x-(7z|rar|zip)-compressed|zip|gzip|arj|x-(bzip2|gzip|lha|stuffit|tar)|pdf|msword|vnd.openxmlformats-officedocument.wordprocessingml.document|vnd.ms-excel|vnd.openxmlformats-officedocument.spreadsheetml.sheet|vnd.ms-powerpoint|vnd.openxmlformats-officedocument.presentationml.presentation)
luceos
I test to add the "minimum-stability": "dev""prefer-stable": true
or require"fof/upload": "1.3.0@dev"
to composer.json,but composer tell me
Problem 1
- Root composer.json requires fof/upload 1.3.0@dev, found fof/upload[dev-dw/fix-upload-button-size, dev-cw/mime-inspector, dev-dk/edit-modal, dev-dk/image-in-private-discussions, dev-dependabot/npm_and_yarn/js/terser-5.14.2, dev-dk/beta-14, dev-master, dev-beta13, 0.1.0, ..., 0.14.0, 1.0.0, ..., 1.2.3] but it does not match the constraint.
Look like composer can't find tag 1.3.0@dev?
- Edited
luceos
Do you test this command?I want say the Composer can't find the 1.3.0 version,all tag just that:
fof/upload[dev-dw/fix-upload-button-size, dev-cw/mime-inspector, dev-dk/edit-modal, dev-dk/image-in-private-discussions, dev-dependabot/npm_and_yarn/js/terser-5.14.2, dev-dk/beta-14, dev-master, dev-beta13, 0.1.0, ..., 0.14.0, 1.0.0, ..., 1.2.3
Look like no 1.3.0 version……,but I see 1.3.0 version in github tag?I don't know why composer can't find 1.3 version......
What is changed on 1.3.0-beta.1 version?
masihdindar the ability to connect files to posts and delete files no longer related to posts.
luceos So FINALLY we have it. thanks
- Edited
Remembering this and especially seeing the release of 1.3.0 with the beta label (I hadn't heard of this), I have encouraged me to update a site in production to 1.3.0, all pretty well, all images were hosted on R2 ie S3 compatible (so all good on that), the only thing is that I had to do this we talked about (luceos) as it gave the same error so I guess it will be important for the final release post.
I'm glad it allows you to go saying yes or no with each image, because thanks to that I have been able to notice that it turns out that the thumbnails of the Blog articles (v17development/flarum-blog
), detects them as 'deleted' images and that they are nowhere, because as the URL of these images are only in that specific field and normally not added back to the body of the article (where it detects them), it asks if you want to delete them, thanks to that I have been able to go 1 by 1 saying no.
As the number of Blog articles grows I feel it will be a problem/annoyance, would it be possible to take into account that field for cleanups?
Quite surprised at the amount of images people upload and don't end up posting in the final post
I've been waiting for this functionality, thank you @luceos I'm not sure I will be in a hurry to install a beta on my production forum, however I will certainly do so once ready. Are there any plans for visual (interactive) mode of deleting the images where I can actually see the image?
For clarification, there are the following scenarios with the current upload implementation and the expected outcome of the cleanup logic. @luceos can you confirm each one and if the new implementation supports it?
- User uploads an image, never embeds it in a post, then deletes the entity in his media library (a file remains on the filesystem) -> Admin decides whether the physical file on the filesystem is deleted.
- User uploads an image, never actually embeds it in a post but keeps the entity in his media library -> Admin decides whether to remove both the physical file and the user entity
- User uploads an image, embeds it in a post, then deletes the entity in his media library -> no action needed here, however the new implementation will preserve who posted the image, right?
- [Regular scenario] User uploads an image, embeds it in a post, keeps the entity in his media library -> no action needed here
- Edited
Hi FoF!
Thank you for this great plugin. It feels very natural to just copy-paste images or files into the editor.
I'm using quick-and-dirty hack of BbcodeImageTemplate.php to limit preview size.
I'm adding width=250 to the template.
It makes forum much more readable, with ability to view full-size images on click.
Do you consider implementing this feature?
public function preview(File $file): string
{
return '[URL='.$file->url.'][IMG width=250]'.$file->url.'[/IMG][/URL]';
}
I can understand that.
It took me a bit to understand each of the scenarios. Let me first clarify a few things about the upcoming v1.3.0
- to map uploads against posts a command needs to run, for now this needs to be executed manually and once you understand it, it can be added as a separate cron (it is not registered as a scheduled task just yet)
- only through this mapping command can you also decide to cleanup uploaded files that could not be mapped against posts
- the command allows you to interactively skip files instead of deleting
- you can use the command to ignore recently uploaded files
CyberGene Are there any plans for visual (interactive) mode of deleting the images where I can actually see the image?
Not immediately.
CyberGene User uploads an image, never embeds it in a post, then deletes the entity in his media library (a file remains on the filesystem) -> Admin decides whether the physical file on the filesystem is deleted.
With the ability to map uploads to posts, this would now classify as a bug. I'm thinking it might make sense to add an option "allow orphan uploads" or similar, where an admin can allow uploads that never get attached to posts. This would disable the purging ability.
CyberGene User uploads an image, never actually embeds it in a post but keeps the entity in his media library -> Admin decides whether to remove both the physical file and the user entity
Under the new version, any files not attached to posts will be deleted if you use the new map command with the --cleanup
flag. The admin can selectively go over all files, or just blindly purge all orphaned files.
So yeah, this is supported.
CyberGene User uploads an image, embeds it in a post, then deletes the entity in his media library -> no action needed here, however the new implementation will preserve who posted the image, right?
With the ability to map uploads to posts, we can now actually take action on the post too. What would be valid options in this case?
CyberGene [Regular scenario] User uploads an image, embeds it in a post, keeps the entity in his media library -> no action needed here
Correct.