mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
CE-1068: changes from review: allow multiple email address entry, fixed download urls, fixed localhost to use inbucket/filesystem
This commit is contained in:
@ -51,7 +51,7 @@ public class FilesystemStorageAction extends AbstractFilesystemAction implements
|
||||
try
|
||||
{
|
||||
String fullPath = getFullPath(storageInput);
|
||||
File file = new File(fullPath);
|
||||
File file = new File(fullPath);
|
||||
if(!file.getParentFile().exists())
|
||||
{
|
||||
if(!file.getParentFile().mkdirs())
|
||||
@ -100,4 +100,15 @@ public class FilesystemStorageAction extends AbstractFilesystemAction implements
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
@Override
|
||||
public String getDownloadURL(StorageInput storageInput) throws QException
|
||||
{
|
||||
return ("file://" + getFullPath(storageInput));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -112,7 +112,30 @@ public class S3StorageAction extends AbstractS3Action implements QStorageInterfa
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
throw (new QException("Exception getting s3 input stream for file", e));
|
||||
throw (new QException("Exception getting s3 input stream for file.", e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
@Override
|
||||
public String getDownloadURL(StorageInput storageInput) throws QException
|
||||
{
|
||||
try
|
||||
{
|
||||
S3BackendMetaData backend = (S3BackendMetaData) storageInput.getBackend();
|
||||
preAction(backend);
|
||||
|
||||
AmazonS3 amazonS3 = getS3Utils().getAmazonS3();
|
||||
String fullPath = getFullPath(storageInput);
|
||||
return (amazonS3.getUrl(backend.getBucketName(), fullPath).toString());
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
throw (new QException("Exception getting the S3 download URL.", e));
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,7 +158,7 @@ public class S3StorageAction extends AbstractS3Action implements QStorageInterfa
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
throw (new QException("Exception making s3 file publicly available", e));
|
||||
throw (new QException("Exception making s3 file publicly available.", e));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user