How to show DigitalOcean private Spaces temporaryURL on Laravel? - laravel

I have successfully generated a temporary link in laravel which works correctly locally but when I try to generate a link via Storage::temporaryUrl for the production environment, it does not work. The error message is this "This driver does not support creating temporary URLs."
The link works only with Storage::URL, but when I try to access it I get an Access Denied because it does not have a temporary key.
I was wondering if there is a way to generate a temporary URL for the link with temporary key.

Related

Link to storage folder not working on hosting

In my local project I save the images in the storage path and load normally with asset('storage/...');
Everything works smoothly. I do not have full access to the hosting to upload the project. only access via FTP, no ssh access. When the project is unpacked on the hosting, the storage link in the public folder brings all the files as a folder. I removed it and because I don't have ssh access I declared a route to execute the command.
Route::get('storage-link', function(){
Artisan::call('storage:link');
echo (Artisan::output());
});
When running the route, it even prints the message that it normally shows when the command is run in the console, saying that the link between the folders was created.
The problem is that the images do not load.
asset('/storage/cars/photo.jpg')
if I pass the folder to the public and call it without going through the link to the storage folder asset('/cars/photo.jpg') it shows it correctly.
I hope you can help me. Thanks in advance.

Swift_IoException: Unable to open file for reading from a public url

I am trying to attach a pdf to an email generated using SwiftMailer on Laravel. The pdf is at a publicly accessible location, but I get this error:
Swift_IoException(code: 0): Unable to open file for reading [https://www.mynewdomain.com/myfile.pdf]
Previously this file was accessed with https://www.myolddomain.com/myfile.pdf which still works - the file can be attached correctly. The new domain was set up and the file can be accessed using it through a browser, but for some reason swiftmailer throws this error when trying to read it.
The storage location of the file hasn't been changed. The only new thing is the domain the nginx config which is the same as the old, with the new domain name.
Is there a reason why this wouldn't be working?
Thanks,

Laravel 4 - can't access images in public folder

I have a strange behaviour from Laravel. I just copied the website to a new hoster. Everything is working quite fine but one thing: I can't access the images in my public folder. If I try to open an image on my own with "domain.com/img/Ausfahrten/42.png i get the following error:
error image loading
The folder structure on my server looks like this:
enter image description here
What method can't laravel find and how can I resolve this? I've already checked file permissions on the server, everything's fine there.
Laravel throw that error when it cannot find the file. Try to access to another directory without Uppercase letter in its path name.

Parse Server - Uploading files using AppId vs FileKey for directory name

This question is in regarding to Parse Server deployment done on Heroku/Localhost Vs. Parse.com behavior:
If I upload files to Parse.com I get a URL as:
http://files.parsetfss.com/<fileKey>/<unique-id>-<provided-filename>
But, when I use the deployment on Heroku or Localhost, I get a URL as:
http://localhost:1337/<appId>/<unique-id>-<provided-filename>
I have provided a fileKey in my index.js of my parse server, yet it doesn't use it when creating the URL but instead uses the AppId for the directory in the URL.
Is there a setting so I can hide the appId and simply use the fileKey?
Thank you.

Need to change DB password in Joomla

The DB password was recently change for a website I'm working on (for reasons I won't get into). As such, Joomla is no longer able to connect to the DB, prompting the error message: Database connection error (2): Could not connect to MySQL.
Fortunately, I do know that I need to simply update the password in the configuration.php file to use the new password, but all of my attempts at making the change have failed. For security reasons I'm sure, I am completely unable to upload my modified configuration.php file. Normally I'd be happy to hear that the configuration file can't be modified, but in this one instance I need to modify it.
How would I go about modifying the file?
You options would be:
Upload new configuration.php via FTP file with new DB password value, however as you mentioned, you're unable to upload it.
Login to your hosting control panel and upload the configuration.php file via the built-in File Manager
Login to and change the password back to it's original value
Get in contact with your hosting provider and find out as to why you're unable to upload the config file.
One of the above options should work, however if all else fails, your last resort will be to contact the person who changed the DB password and ask them to change it back.
Being unable to upload / modify the configuration file, smells like a permissions issue. Maybe the file has permissions set to 444. Many FTP clients allow manipulation of the file permissions. You can set them to 644 for the config. file and then save it. If you can't do this through the FTP client, then try it within the cPanel.

Resources