Using Flarum Beta (current as of 1/12/2017)
Added S3 extension requirements.
Correctly added S3 creds.
Granted bucket privileges to Public.
When I upload an image, it (the image) does not display on the forum the output is:
![image autopng.png](https://s3.us-west-2.amazonaws.com/oe800/2017-01-12/18:58:430-autopng.png)
The output needs to be changed.
https://s3.us-west-2.amazonaws.com/oe800/2017-01-12/18:58:430-autopng.png
to:
https://s3-us-west-2.amazonaws.com/oe800/2017-01-12/18%3A58%3A430-autopng.png
Notice the :
is changed to %3A
Is there a source file / location I can make the changes to? A package I am missing?
https://github.com/flagrow/upload/blob/master/src/Adapters/Flysystem.php I believe is the file to adjust.
protected function generateFilename(File $file)
{
$today = (new Carbon());
$file->path = sprintf(
"%s/%s",
$today->toDateString(),
$today->toTimeString() . $today->micro . '-' . $file->base_name
);
}
I thought I could just remove the $today lines so that its just $file->base_name
I however get errors. Not much of a coder. Any help would be greatly appreciated.
Changed above code to:
protected function generateFilename(File $file)
{
$today = (new Carbon());
$file->path = sprintf(
"%s",
$today->toDateString() . $today->micro . '-' . $file->base_name $
}
This removed the time stamp from the forum output, but the file still gets uploaded to S3-bucket with the time stamp. Where do I make the change to remove the timestamp from the file before it gets uploaded?
Maybe have an option to disable appending a date and time stamp to the end of the file would remove future issues with characters .
Thank you. Have a happy Friday the 13th.